Refine logic to select smaller image size #292
Labels
[Plugin] Modern Image Formats
Issues for the Modern Image Formats plugin (formerly WebP Uploads)
[Type] Enhancement
A suggestion for improvement of an existing feature
Milestone
As outlined in #186 (comment), there is a flaw with the current approach of choosing the smaller image MIME file in frontend content:
While attaching the
webp_uploads_get_mime_types_by_filesize()
function to thewebp_uploads_content_image_mimes
filter seems elegant, I think this is the wrong integration point here. It's not sufficient to universally choose a preferred MIME type based on thefull
image size. We have to instead modifywebp_uploads_img_tag_update_mime_type()
directly and make this check for every image size individually.The text was updated successfully, but these errors were encountered: