Skip to content

Modern Image Formats: link to FAQ from settings section#2480

Open
Gilmoursa wants to merge 3 commits into
WordPress:trunkfrom
Gilmoursa:fix/2442-modern-image-format-faq-link
Open

Modern Image Formats: link to FAQ from settings section#2480
Gilmoursa wants to merge 3 commits into
WordPress:trunkfrom
Gilmoursa:fix/2442-modern-image-format-faq-link

Conversation

@Gilmoursa

Copy link
Copy Markdown

Summary

Fixes #2442.

Users frequently open support topics confused about why their uploads aren't generating AVIF/WebP files. The FAQ in readme.txt already explains the primary reason (the plugin discards converted images that would be larger than the original), but there was nothing in the admin UI pointing users there.

This adds a brief note with a link to the plugin FAQ on WordPress.org in the Modern Image Formats settings section on Settings > Media, so users can find the explanation without having to search the support forums.

The section previously used __return_empty_string as its callback (no description rendered). This replaces it with a dedicated callback that outputs a single sentence linking to the FAQ.

Changes

  • plugins/webp-uploads/settings.php: replace __return_empty_string section callback with webp_uploads_modern_image_format_settings_section_callback() which renders a FAQ link
  • plugins/webp-uploads/tests/test-settings.php: add test asserting the callback outputs the FAQ URL and an anchor tag

Test plan

  • Navigate to Settings > Media with the Modern Image Formats plugin active — confirm a note with a link to the FAQ appears under the "Modern Image Formats" section heading
  • Confirm the link points to https://wordpress.org/plugins/webp-uploads/#faq
  • Run the unit tests: composer test:integration -- --filter test_webp_uploads_modern_image_format_settings_section_callback

@github-actions

github-actions Bot commented May 15, 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: Gilmoursa <gilmoursa@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.

Adds a brief note with a link to the plugin FAQ on WordPress.org in
the Modern Image Formats settings section on Settings > Media. Users
frequently open support topics confused about why uploads aren't
generating AVIF/WebP files — the FAQ already explains the common
reason (converted file discarded when larger than original), so the
settings UI now points there rather than duplicating the text.

Fixes WordPress#2442.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Gilmoursa Gilmoursa force-pushed the fix/2442-modern-image-format-faq-link branch from 6ac4526 to 5601df6 Compare May 15, 2026 14:58
@codecov

codecov Bot commented May 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.86%. Comparing base (347597f) to head (bf1b6eb).
⚠️ Report is 5 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff             @@
##            trunk    #2480      +/-   ##
==========================================
+ Coverage   69.33%   69.86%   +0.52%     
==========================================
  Files          90       90              
  Lines        7749     7759      +10     
==========================================
+ Hits         5373     5421      +48     
+ Misses       2376     2338      -38     
Flag Coverage Δ
multisite 69.86% <100.00%> (+0.52%) ⬆️
single 35.68% <0.00%> (-0.05%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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
'perflab_modern_image_format_settings',
_x( 'Modern Image Formats', 'settings page section name', 'webp-uploads' ),
'__return_empty_string',
'webp_uploads_modern_image_format_settings_section_callback',

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.

I think a closure here would make more sense than a global function.

Comment thread plugins/webp-uploads/settings.php Outdated
/**
* Renders the description for the Modern Image Formats settings section.
*
* @since 3.10.0

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.

FYI: we use n.e.x.t for version numbers and then update them before a release.

@westonruter westonruter added [Type] Enhancement A suggestion for improvement of an existing feature [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) labels May 15, 2026
@westonruter westonruter added this to the webp-uploads n.e.x.t milestone May 15, 2026
Gilmoursa and others added 2 commits May 15, 2026 13:11
…ings_fields

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
….e.x.t version

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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