Skip to content

Modify WebP default behavior to follow latest decision (generate only WebP for JPEG) #524

Closed

Description

@felixarntz

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.

While the short-term future of the WebP feature is unclear, we should definitely align the plugin implementation with the latest decision made for the core side, as that is the safer default.

Activity

  1. added this to the 1.5.0 milestone on Sep 12, 2022
  2. added and removed
    Needs DevAnything that requires development (e.g. a pull request)
    on Sep 13, 2022
  3. removed their assignment
    on Sep 13, 2022
  4. eugene-manuilov commented on Sep 13, 2022

    @eugene-manuilov
    Contributor

    @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?

  5. eugene-manuilov commented on Sep 13, 2022

    @eugene-manuilov
    Contributor

    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.

  6. removed their assignment
    on Sep 13, 2022
  7. eugene-manuilov commented on Sep 13, 2022

    @eugene-manuilov
    Contributor

    Ok, fixed all found issues. This is ready for review now.

  8. modified the milestones: 1.5.0, 1.6.0 on Sep 14, 2022
  9. felixarntz commented on Sep 14, 2022

    @felixarntz
    MemberAuthor

    @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.

  10. eugene-manuilov commented on Oct 4, 2022

    @eugene-manuilov
    Contributor

    @felixarntz I have updated my PR. Could you please take another look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions