Skip to content

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

@westonruter

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Plugin] Modern Image FormatsIssues for the Modern Image Formats plugin (formerly WebP Uploads)[Type] BugAn existing feature is broken

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Not Started/Backlog 📆

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions