setting a new max size for existing -scaled images and optimising
-
Hi,
we have a lot of media on our site (several thousand) and are looking to optimize the library with EWWW.
Currently the site creates
-scaled.jpg
versions at the default2560
when we upload larger images. We want to set a new max size of2048
and apply this to both new images and old images.
Out of a few thousand posts, we have 427 posts that use these-scaled.jpg
versions
EWWW lets us set a maximum width/height.
WordPress lets us also set a maximum threshold usingadd_filter('big_image_size_threshold', ......
and remove the2048x2048
and2560x2560
sizes using egremove_image_size('2048x2048')
or filtering onintermediate_image_sizes_advanced
When I tried to combine these I ended up breaking the image. The-scaled.jpg
version became the new “original” on the attachment screen – (even though the original is still on disk)… I couldn’t get it to show this:File name: original-scaled.jpg
Original: original.jpg
(this part disappeared)`
ie it loses the connection to the original image… meaning thumbnails now got regenerated asoriginal-scaled-150x150.jpg
etc rather thanoriginal-150x150.jpg
etc
I think messing with the max image size threshold confused it when running “Regenerate Thumbnails” plugin
Again we are just trying to reduce theoriginal.jpg
version to 2048×2048 max on upload. There would be no reason for theoriginal-scaled.jpg
version presumably at this point, but since they are 427 posts with-scaled
versions attached, it would see we can’t just remove the scaled versions entirely.Is there a way to run EWWW & Regenerate Thumbnails in a way that
1) resizes all originals to2048x2048
max
2) understands pointing the-scaled
(default2560x2560
max) versions already attached to posts back to the original image which should now be2048x2048
max
thanks
J.
- The topic ‘setting a new max size for existing -scaled images and optimising’ is closed to new replies.