WebP not generated/served when “Output fallback images” is enabled
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 67/100
Research direction
Reproduce the issue through a WordPress Media Library upload with WebP output and fallback images enabled, then compare the generated files and frontend references with fallback disabled. Trace the upload and frontend-serving paths to find why WebP generation is skipped; done means WebP files are generated and served when fallback images are enabled, while existing fallback behavior remains intact.
Written by the indexing model from the issue text.
Description
From a support topic by @daltonsutton:
I understand the plugin prefers the original format when it’s smaller than the generated WebP and only uses WebP when it’s smaller. However, with “Output fallback images” enabled, new uploads never generate or serve WebP; only the original format is used on the frontend. If I turn fallback off, WebP is generated and used as expected. I tested many image types and sizes (JPEG and PNG), regenerated thumbnails after changing settings, cleared caches, and toggled “Generate all fallback image sizes.” With fallback enabled, I don’t see a .webp file in uploads and the frontend never references .webp; with fallback disabled, I see the WebP output working.
Environment: WordPress 6.8.2, Modern Image Formats 2.6.1, PHP 7.4.33 (apache2handler), single-site, production. Imagick is active (WP_Image_Editor_Imagick; ImageMagick 6.9.10-97; imagick 3.7.0); GD also present. AVIF not available.
Reproduction: set output format to WebP, enable fallback images, upload a JPEG that should compress well, insert it into a post, and view the frontend—only .jpg is referenced and no .webp is created. I also don’t see WebP generated when uploading directly to the Media Library. Disabling fallback and repeating the same steps generates and serves WebP as expected.
The generation for WebP is being skipped entirely when fallback is on no matter what image type or size I use. Is this a known issue with fallback enabled? Thanks!
- Dominant language
- PHP
- Stars
- 461
- Forks
- 165
- Avg merge
- 11h 12m
- Merged PRs (30d)
- 28
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WordPress/performance
-
[Plugin] Optimization Detective [Type] Enhancement ContributorDay
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
WordPress/performance#2224 · 2 comments · 1 reaction ·
-
[Plugin] Modern Image Formats [Type] Enhancement Needs Discussion
WordPress/performance#2662 · 1 assignee ·
-
[Type] Bug
WordPress/performance#2643 · 4 comments · 1 assignee ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
WordPress/performance#2640 · 3 comments ·
-
[Plugin] Optimization Detective [Type] Bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
WordPress/performance#2622 · 8 comments ·
All issues in WordPress/performance
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RSS-Bridge/rss-bridge#5098 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
phingofficial/phing#2025 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
silverstripe/developer-docs#911 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100