You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Modify WebP default behavior to follow latest decision (generate only WebP for JPEG) #524
As part of https://core.trac.wordpress.org/ticket/55443, it was recently decided to change the default behavior of the WebP implementation back to generating only WebP versions for the sub-sizes of a JPEG upload, rather than both WebP and JPEG versions for every size.
We should align with this in the plugin, i.e. adjust the default value for the webp_uploads_upload_image_mime_transforms filter, so that both image/jpeg and image/webp result in only image/webp.
@felixarntz, I have created PR #527 that removes image/jpeg versions from the transformations list for jpeg uploads. The question is do we need to leave only webp versions for webp uploads as well since generating jpeg-s for webp images doesn't make sense anymore, right?
Actually, found one more problem with webp images after implementing changes required for this ticket. Will include it into my PR once I find a way how to fix it.
@eugene-manuilov @bethanylang Changing the milestone here to 1.6.0 because unfortunately changing the default in the PR #527 has uncovered some flaws in our logic which have always been there but only surface as problems now. So this is a great outcome honestly, although unfortunately it means we'll need more time to change the default here than originally intended.
The logic should still work well as long as sites create both MIME types, but to change the default to just WebP it is more critical that we fix those flaws.
Reacted by Bethany Chobanian Lang and Jeffrey Paul
Activity
eugene-manuilov commentedon Sep 13, 2022
@felixarntz, I have created PR #527 that removes
image/jpegversions from the transformations list forjpeguploads. The question is do we need to leave onlywebpversions forwebpuploads as well since generatingjpeg-s forwebpimages doesn't make sense anymore, right?eugene-manuilov commentedon Sep 13, 2022
Actually, found one more problem with webp images after implementing changes required for this ticket. Will include it into my PR once I find a way how to fix it.
eugene-manuilov commentedon Sep 13, 2022
Ok, fixed all found issues. This is ready for review now.
felixarntz commentedon Sep 14, 2022
@eugene-manuilov @bethanylang Changing the milestone here to 1.6.0 because unfortunately changing the default in the PR #527 has uncovered some flaws in our logic which have always been there but only surface as problems now. So this is a great outcome honestly, although unfortunately it means we'll need more time to change the default here than originally intended.
The logic should still work well as long as sites create both MIME types, but to change the default to just WebP it is more critical that we fix those flaws.
eugene-manuilov commentedon Oct 4, 2022
@felixarntz I have updated my PR. Could you please take another look?