Back to Community

Troubleshooting WebP Image Issues with Speed Optimizer

Content

Many WordPress users leverage the Speed Optimizer plugin to automatically convert images to the modern WebP format. This is a fantastic way to improve page load times and boost your Google PageSpeed Insights score. However, the conversion process doesn't always work perfectly for every image, leading to confusion and lower performance scores.

Based on common community reports, here are the most frequent reasons some images may not be served as WebP and how to resolve them.

Common Reasons for WebP Conversion Issues

  • File Size Limits: The plugin has built-in size limits to ensure stable conversion. PNG images larger than 1MB and animated GIFs larger than 500KB are typically not converted. This is by design, as very large files are often intended to be high quality and may not benefit from conversion.
  • Third-Party Caching (e.g., Cloudflare): If a CDN or caching layer caches the first version of an image served (e.g., a JPEG), it may continue serving that format even after WebP copies are generated. A full cache purge is usually required to see the change.
  • Non-Standard File Paths: The plugin primarily optimizes images uploaded through the WordPress Media Library. Images that are part of a theme, a plugin like NextGen Gallery, or manually uploaded via FTP may not be processed.
  • File Type and Original Format: The plugin can sometimes be tricked by a file's extension. An image saved with a .jpg extension that is actually a PNG format internally may hit the PNG size limit and fail to convert.
  • Using PHP to Call Images: Using functions like wp_get_attachment_image_src() may not automatically serve the WebP version. The plugin typically handles this via server-level rules, but specific implementations can sometimes bypass this.

How to Troubleshoot and Fix These Issues

  1. Check File Sizes: Identify the images not converting and check their file sizes. If they exceed the limits, you will need to optimize and resize them manually before re-running the WebP generation.
  2. Purge All Caches: If you use a CDN like Cloudflare or any other server-level cache, purge it entirely after generating WebP images. Also, purge your site's internal cache from the Speed Optimizer or your hosting panel.
  3. Bulk Regenerate WebP Images: If you've recently changed image sizes or fixed large files, use the 'Bulk Generate WebP Files' tool in the Speed Optimizer settings. This will reprocess all eligible images. Note: As stated by the plugin's team, disabling and re-enabling the WebP feature will delete all existing WebP images before regenerating them.
  4. Verify the True Image Format: If a .jpg file is not converting, it might actually be a PNG. Try opening the image in an editor and re-exporting it as a true JPEG, ensuring it is under the size limit.
  5. Check for Official Filters: For developers, the Speed Optimizer team has confirmed that a filter to exclude specific images from WebP conversion is planned for a future update. Currently, the only workaround is to manually delete the WebP version of a specific image from the server, though this is not a permanent solution.

Important Warning About Manually Uploaded WebP Files

A critical behavior to be aware of is that if you disable the 'Use WebP Images' option in the plugin, it will delete all files with a .webp extension in the uploads directory. This includes not only the copies it created but also any WebP images you uploaded manually to your media library. Always ensure you have a backup before toggling this setting off.

By methodically working through these common causes, you can resolve most WebP serving issues and ensure your site is delivering optimally formatted images to your visitors.

Related Support Threads Support