Skip to content

WebP not generated/served when “Output fallback images” is enabled #2390

Open

Description

@westonruter

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!

Activity

  1. moved this to Not Started/Backlog 📆 in WP Performance Ongoingon Feb 16, 2026
  2. the-hercules commented on Feb 18, 2026

    @the-hercules
    Contributor

    @westonruter I am not able to reproduce the said bug with the latest code.

    Tested with uploading JPEG with “Output fallback images” enabled:

    • WebP files are generated in the uploads directory
    • WebP is being served on the frontend (verified in rendered HTML)

    Could it be that the image user uploaded did not compress well to WebP so the user is getting JPEG image only.

  3. b1ink0 commented on Mar 9, 2026

    @b1ink0
    Contributor

    Hi @daltonsutton, can you try disabling the discarding of larger images using the code snippet below and then try uploading the same images again?

    add_filter( 'webp_uploads_discard_larger_generated_images', '__return_false' );
  4. 319heads commented on Jun 30, 2026

    @319heads

    Is this ever going to be fixed? I have this exact issue on every site I run this plugin on. As soon as you activate "Output fallback images" webp images fail to generate on any new uploads.

  5. 319heads commented on Jun 30, 2026

    @319heads
    webp-not-generating.mp4

    Screen recording of replicating the issue on a fresh WP install without any other plugins activated and uploading a 2MB test jpg.

  6. adamsilverstein commented on Jul 12, 2026

    @adamsilverstein
    Member

    upload a JPEG that should compress well

    As noted above you might not be getting WebPs because they aren't any smaller than the JPEGs, thats by design.

    Is this ever going to be fixed? I have this exact issue on every site I run this plugin on. As soon as you activate "Output fallback images" webp images fail to generate on any new uploads.

    Generally I would not recommend trying to use WebP images with "generate fallbacks " enabled. Unlike AVIF, WebP are considered "web-safe" and supported in all major browsers (for years)! The only reason you would ever need the jpeg fallback would be to support very old browsers or operating systems that lack WebP support.

    In fact, I would suggest we disable the fallback generation option when WebP is the selected output option. What do you think @b1ink0 or @westonruter? Am I missing some reason users would want to generate both?

    @319heads can you please try a few tests:

    • try different images, is the behavior the same?
    • check the page source code, with the fallback enabled, do you see the image wrapped in a picture element? with it disabled, do you see a srcset with various webp images?
    • check Tools->Site Health->Info->Media to make sure your server supports WebP (it will be listed in supported types)

    Also, can you explain your use case: why did you want the fallback enabled?

  7. IPreferPapernadPen commented on Aug 15, 2026

    @IPreferPapernadPen

    Also, can you explain your use case: why did you want the fallback enabled?

    I am having the same issue. As you can probably tell by my name, I am the latest of adopters, so I don't know how to check code or whatever. What I do know is that I turned on generate fallbacks back in late March and it's never worked.

    A friend set up my Wordpress and installed this plugin because I am a photographer and artist and so I have a lot of big images on my site. When she set up this plugin (years ago), she set it up to generate AVIF.

    I had to set up generate fallbacks because when I tried submitting blog posts to a photography message board's blog section, it failed. There was a form where you entered URL, a brief blurb, and the photos in the post would generate and you could select the thumbnail to go with it. Except it would not accept AVIF files. I had to disable the plugin, upload a JPG, then submit the post link. (I had a conversation with the dude who runs the site, and he confirmed the AVIF was the problem.)

    I thought that generating fallbacks would make it so a JPG would load if AVIF couldn't. As an artist and photographer, that's important to me.

    Right now, I can't make AVIF's because of ImageMagick, which I'll get my spouse to deal with later. (It IS listed as a supported filetype when I go to Site Health->Info->Media, but the plugin won't let me make an AVIF, the option is greyed out.) But I just tested WebP format and a) it created a smaller file than the jpg, but b) it only did that when fallback was turned off, because c) otherwise it only uploaded the larger jpg.

    Wordpress version: 7.0.4
    Plugin version: 2.7.1
    ImageMagick: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org (says AVIF and WEBP are supported)

  8. adamsilverstein commented on Sep 1, 2026

    @adamsilverstein
    Member

    Right now, I can't make AVIF's because of ImageMagick, which I'll get my spouse to deal with later. (It IS listed as a supported filetype when I go to Site Health->Info->Media, but the plugin won't let me make an AVIF, the option is greyed out.) But I just tested WebP format and a) it created a smaller file than the jpg, but b) it only did that when fallback was turned off, because c) otherwise it only uploaded the larger jpg.

    Hi @IPreferPapernadPen - you may be able to use AVIF if you upgrade to WordPress 7.1, however I'm not certain that will work even though we support AVIF natively now, I'm not sure the plugin will pick up on this (and may need an update for this).

    I would check with your photo submission guidelines to make sure WebP is among their supported formats, then just switch to WebP without fallback.

    Also in 7.1 we shipped end to end HDR support which should make your images look better. JPEG compression also gets better so your images should be a little smaller even without this plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions