Would you be able to provide the site URL so I can take a look?
It looks like your WebP Images are generated but not served.
Generally this happens for the following reasons
- You are on a ngix server and you apply custom rules to nginx.conf file manually. If this is the case, please add this to your ngix.conf.
<IfModule mod_setenvif.c>
# Vary: Accept for all the requests to jpeg, png, and gif.
SetEnvIf Request_URI "\.(jpg|jpeg|jpe|png|gif)$" REQUEST_image
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Check if browser supports WebP images.
RewriteCond %{HTTP_ACCEPT} image/webp
# Check if WebP replacement image exists.
RewriteCond %{REQUEST_FILENAME}.webp -f
# Serve WebP image instead.
RewriteRule (.+)\.(jpg|jpeg|jpe|png|gif)$ $1.$2.webp [T=image/webp,NC]
</IfModule>
<IfModule mod_headers.c>
Header append Vary Accept env=REQUEST_image
</IfModule>
2. mod_rewrite is not active on the server (Apache)
Thanks for your reply.
mod_rewrite is active on the server (Apache)
What else could be the issue? A conflicting plugin?
Serving webp images also uses these modules mime
and headers
Could you please visit wp-admin/options.php
and see what the values are for these options
https://prnt.sc/U6mIk-Vs4zfy
Both wp-optimize-redirection_possible
and wp-optimize-rewrite_status
are true
mime
and headers
are also enabled on the server
Could there be a problem writing to .htaccess
? Or..?
We had other image compression plugins active before, could this be part of the problem?
We also use Wordfence and Cloudflare…
Can you clear your cloudflare cache?
I suspect this might be the root of the issue.
We have removed Cloudflare completely and cleared the WP-Optmize cache. Issue persists
But I did notice that when I right click > save the site logo, the file is WebP
Other images are not, even though they have all been compressed
Why might that be? Because I compressed the logo more recently?
It doesn’t look like all of your images are actually in WebP format.
For example, this image:https://www.sgtmartinho.com/wp-content/uploads/2023/07/2.-Background-1-scaled-375×375.jpg
There is no WebP version: https://www.sgtmartinho.com/wp-content/uploads/2023/07/2.-Background-1-scaled-375×375.jpg/web
With WPO WebP versions are only created for newly added images so it may be that you need to add the images again.
Thank you, but we have hundreds of images and adding them all again is not feasible
So the bulk compress feature doesn’t work, is that right? That is what we used to compress many of our images
The bulk compress feature works but at the moment you can only create WebP versions of newly added images (the method for creating WebP images is different than the one for compressing images). Compressing images and serving them in a next gen format (WebP) is not the same.
We should have the functionality to convert all WebP images coming soon though. I have checked our development and it is currently on the list for “next release”
That is great news! Hopefully with the next release we will be able to convert all our images to WebP