[wp-trac] [WordPress Trac] #50396: Can't regenerate "-scaled.jpg" images

WordPress Trac noreply at wordpress.org
Tue Jun 16 09:39:38 UTC 2020


#50396: Can't regenerate "-scaled.jpg" images
--------------------------+-----------------------------
 Reporter:  mattiasf      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  5.4.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50396>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list