Skip to content

Add explanation for discarded modern image outputs#2518

Merged
westonruter merged 3 commits into
WordPress:trunkfrom
gabelivan:2442-modern-image-format-explanation
Jun 18, 2026
Merged

Add explanation for discarded modern image outputs#2518
westonruter merged 3 commits into
WordPress:trunkfrom
gabelivan:2442-modern-image-format-explanation

Conversation

@gabelivan

@gabelivan gabelivan commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

See #2442.

Summary

Adds a short explanation to the Modern Image Formats setting to clarify that generated AVIF/WebP images may be discarded when the generated file is larger than the original upload.

Testing

  • Verified the description appears under the Image output format setting in Media Settings.
  • Ran npm run lint-php.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: gabelivan <gabelivan@git.wordpress.org>
Co-authored-by: westonruter <westonruter@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.11%. Comparing base (e02b267) to head (60ed889).
⚠️ Report is 5 commits behind head on trunk.

Files with missing lines Patch % Lines
plugins/webp-uploads/settings.php 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk    #2518      +/-   ##
==========================================
- Coverage   69.14%   69.11%   -0.03%     
==========================================
  Files          90       90              
  Lines        7723     7726       +3     
==========================================
  Hits         5340     5340              
- Misses       2383     2386       +3     
Flag Coverage Δ
multisite 69.11% <0.00%> (-0.03%) ⬇️
single 35.49% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread plugins/webp-uploads/settings.php Outdated
<p class="description" id="perflab_modern_image_format_description"><?php esc_html_e( 'Select the format to use when generating new images from uploaded images.', 'webp-uploads' ); ?></p>
<p class="description" id="perflab_modern_image_format_description">
<?php esc_html_e( 'Select the format to use when generating new images from uploaded images.', 'webp-uploads' ); ?>
<?php esc_html_e( 'Generated images may be discarded if the modern image format file is larger than the original uploaded image.', 'webp-uploads' ); ?>

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.

Shouldn't this string be combined with the previous string?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I kept them separate intentionally to avoid changing the existing translatable string, since that string may already have translations. This way, only the newly added sentence needs to be translated.

That said, I’m happy to combine them if the preferred approach here is to give translators the full sentence context in a single string.

@westonruter westonruter added [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) [Type] Enhancement A suggestion for improvement of an existing feature labels Jun 4, 2026
@westonruter westonruter added this to the webp-uploads n.e.x.t milestone Jun 18, 2026
@westonruter westonruter merged commit 879e67b into WordPress:trunk Jun 18, 2026
14 checks passed
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.

2 participants