Skip to content

Add explanation for discarded modern image outputs#2518

Open
gabelivan wants to merge 1 commit into
WordPress:trunkfrom
gabelivan:2442-modern-image-format-explanation
Open

Add explanation for discarded modern image outputs#2518
gabelivan wants to merge 1 commit into
WordPress:trunkfrom
gabelivan:2442-modern-image-format-explanation

Conversation

@gabelivan
Copy link
Copy Markdown

Fixes #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
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

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>
Co-authored-by: b1ink0 <b1ink0@git.wordpress.org>

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.27%. Comparing base (ac18b75) to head (1eedc64).
⚠️ Report is 4 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.29%   69.27%   -0.03%     
==========================================
  Files          90       90              
  Lines        7723     7726       +3     
==========================================
  Hits         5352     5352              
- Misses       2371     2374       +3     
Flag Coverage Δ
multisite 69.27% <0.00%> (-0.03%) ⬇️
single 35.74% <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.

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

Add explanation for why modern format images may not appear after upload

2 participants