Why Google Lighthouse Still Shows 'Serve Images in Next-Gen Formats' (And How to Fix It)
Content
Seeing the "Serve images in next-gen formats" warning in Google Lighthouse or PageSpeed Insights after setting up Imagify to convert your images to WebP can be incredibly frustrating. You've done the work, but the audit tool isn't recognizing it. Based on common community reports, this issue is almost always related to how the WebP images are being delivered, not if they exist.
Why This Happens
The 'Imagify Image Optimization' plugin generates WebP versions of your images and stores them alongside your originals with an appended extension (e.g., image.jpg.webp). This is the expected behavior and provides a fallback for browsers that don't support WebP. The Lighthouse warning appears not because the files are missing, but often because of one of these reasons:
- The HTML
<picture>tag markup contains lazy-loading placeholders that audit tools might misinterpret. - A specific image or its thumbnails failed to generate a WebP version.
- Your server's rewrite rules (via .htaccess) are not functioning correctly or are not applied to all images.
- The audit is being run on a cached version of the page.
How to Troubleshoot and Fix the Issue
1. Verify the WebP File Exists
The first step is to confirm a WebP version was actually created for the image flagged by Lighthouse. Take the image's URL and append .webp to the end directly in your browser's address bar.
Example: If the image is https://yoursite.com/wp-content/uploads/example.jpg, try loading https://yoursite.com/wp-content/uploads/example.jpg.webp.
If the WebP image loads, the file exists. If you get a 404 error, the WebP was never generated. In this case, try re-optimizing the image from your WordPress Media Library, ensuring all thumbnail sizes are selected for optimization in the Imagify settings.
2. Check Your Display Method
Imagify offers two primary methods to serve WebP images: <picture> tags and rewrite rules.
- <picture> Tags (Preferred): This method alters your site's HTML to serve WebP images. When you view your page source, you should see
<picture>tags with<source>elements pointing to the.webpfiles. Some community members have noted that complex lazy-loading implementations can sometimes interfere with how audit tools read this markup. - Rewrite Rules: This method uses your server's
.htaccessfile (on Apache) to silently serve the WebP file to supporting browsers without changing the HTML. If you use this method and Lighthouse still flags images, your rewrite rules may not be active. Ensure the Imagify rules are present in your.htaccessfile and that your server supports themod_rewritemodule.
3. Clear All Caches
This is a critical step. Clear your WordPress caching plugin, server-level cache (if applicable), and your browser cache. Then, run the Lighthouse audit again in an incognito/private browser window. Often, the audit was simply analyzing an old, cached version of your page that did not yet have the WebP markup.
4. Look for Specific Image Issues
As seen in community threads, sometimes only one problematic image is causing the warning. It could be a background image defined in CSS (which Imagify's picture tags cannot alter) or a dynamically loaded image that the plugin cannot easily modify. Identify the specific image Lighthouse is complaining about and focus your troubleshooting on it.
Conclusion
Persistent "Serve images in next-gen formats" warnings are typically a display or configuration issue, not a failure of the Imagify plugin itself. The most effective troubleshooting path is to: verify the WebP file exists, confirm your chosen display method is working correctly, and thoroughly clear all caches before re-running the audit.
Related Support Threads Support
-
I convert my image to picture to serve webphttps://wordpress.org/support/topic/i-convert-my-image-to-picture-to-serve-webp/
-
webp extensionhttps://wordpress.org/support/topic/webp-extension/
-
JPG or WEBPhttps://wordpress.org/support/topic/jpg-or-webp/
-
Generate WebP Files for Already Optimised Imageshttps://wordpress.org/support/topic/generate-webp-files-for-already-optimised-images/
-
Serve image in nextgen format on mobile onlyhttps://wordpress.org/support/topic/serve-image-in-nextgen-format-on-mobile-only-2/
-
Next-Gen generated: Partiallyhttps://wordpress.org/support/topic/next-gen-generated-partially/
-
Webp Enable but showing .jpg.webphttps://wordpress.org/support/topic/webp-enable-but-showing-jpg-webp/
-
Understanding image savings – why negative?https://wordpress.org/support/topic/understanding-image-savings-why-negative/
-
Difference in displayhttps://wordpress.org/support/topic/difference-in-display-2/
-
Serve image in nextgen format on mobile onlyhttps://wordpress.org/support/topic/serve-image-in-nextgen-format-on-mobile-only/
-
When I save the optimized image in computer it shows no change in sizehttps://wordpress.org/support/topic/when-i-save-the-optimized-image-in-computer-it-shows-no-change-in-size/
-
PNG not optimizedhttps://wordpress.org/support/topic/png-not-optimized-2/
-
How can I be sure the WebP format is being used?https://wordpress.org/support/topic/how-can-i-be-sure-the-webp-format-is-being-used/
-
How to know a .webp image is generated and served?https://wordpress.org/support/topic/how-to-know-a-webp-image-is-generated-and-served/