Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Introduce webp_uploads_prefer_smaller_image_file filter allowing to opt in to preferring the smaller image file#287

Merged
felixarntz merged 3 commits into
trunkWordPress/performance:trunkfrom
enhancement/smaller-image-file-optinWordPress/performance:enhancement/smaller-image-file-optinCopy head branch name to clipboard
Apr 14, 2022
Merged

Introduce webp_uploads_prefer_smaller_image_file filter allowing to opt in to preferring the smaller image file#287
felixarntz merged 3 commits into
trunkWordPress/performance:trunkfrom
enhancement/smaller-image-file-optinWordPress/performance:enhancement/smaller-image-file-optinCopy head branch name to clipboard

Conversation

@felixarntz

Copy link
Copy Markdown
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
Comment thread modules/images/webp-uploads/load.php Outdated
Comment thread modules/images/webp-uploads/load.php

@adamsilverstein adamsilverstein left a comment

Copy link
Copy Markdown
Member

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

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.