Make WordPress Core

Opened 16 months ago

#50396 new defect (bug)

Can't regenerate "-scaled.jpg" images

Reported by: mattiasf Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.4.2
Component: Media Keywords:
Focuses: Cc:


I have a lot of issues with images that has the "-scaled.jpg" extension.

When uploading images that are large enough to have the "-scaled.jpg" postfix, it's thumbnails is not generated. I have tracked this down to the original being missing.

Take forinstance this image: "earring-anpe-jamie.jpg". After I has been uploaded it resides within the /uploads/ directory as "earring-anpe-jamie-scaled.jpg", however, it has no assosciated thumbnails. If I run wp media regenerate <id> directly on it, it will fail with the warning: Warning: Can't find "Image Name" (ID 191697).

So I believe the issue is that WordPress is looking for the original image name, that does not have the -scaled postfix, however, for some reason it deos not exist. I have made a shellscript to copy all images in the "uploads" directoy that has the -scaled.jpg to it's equivilant image name without -scaled, e.g.

cp image-scaled.jpg image.jpg

I am not sure what caused this, but surely it brings a lot of missing images on our website as theres no thumbnails.

Change History (0)

Note: See TracTickets for help on using tickets.