Skip to content

Conversation

@felixarntz
Copy link
Member

Summary

Fixes #286

Relevant technical choices

  • A simpler solution would have been to just remove the add_filter call to the new function, but that would make it much less intuitive for developers, and they would need to use this "generic" filter, and remember the name of our "internal" function.
  • A dedicated filter is much more intuitive and easy to use.
  • I chose webp_uploads_prefer_smaller_image_file for the filter name for now.

Checklist

  • PR has either [Focus] or Infrastructure label.
  • PR has a [Type] label.
  • PR has a milestone or the no milestone label.

…preferring the smaller image file regardless of MIME type.
@felixarntz felixarntz added [Type] Enhancement A suggestion for improvement of an existing feature [Focus] Images [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) labels Apr 8, 2022
@felixarntz felixarntz added this to the 1.0.0 milestone Apr 8, 2022
@felixarntz felixarntz requested review from jjgrainger and mitogh April 8, 2022 17:43
Copy link
Member

@adamsilverstein adamsilverstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some small feedback points

@adamsilverstein adamsilverstein self-requested a review April 14, 2022 16:24
@felixarntz felixarntz merged commit faa8156 into trunk Apr 14, 2022
@felixarntz felixarntz deleted the enhancement/smaller-image-file-optin branch April 14, 2022 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Only use smaller file size based on opt-in since it is not part of the core feature scope

4 participants