From more research I have done seems to be something with cloudflare cache or SSL (Crypto) settings. I will give more info if I fix this and it’s a configuration thing.
This was the issue and that’s the workaround in a post at community of cloudflare.com
Hi,
This plugin serves webp’s when jpegs are requested. It sets the Content-Type header to ‘image/webp’ to let the browser know that it is a webp. It does however not change the file extension. So that explains why you have trouble when saving images locally and opening.
I haven’t looked into the cloudflare product.
But I shall.
But generally with CDN’s, you will have to tell it that the output varies with the “accept” header. Usually you configure the CDN to forward the “Accept” header.
Btw: It just dawned to me today that WebP Express should set the Vary:Accept header not only when delivering a converted webp, but also when delivering a jpg. Otherwise, if the CDN requests a jpg while forwarding an Accept header that doesn’t contain ‘image/webp’, it will not get the ‘Vary:Accept’ response header.
I am implementing that the Vary:Accept header also gets set when delivering jpgs in the next release. If you cannot wait, try inserting the following .htaccess rules above the WebP Express rules:
<IfModule mod_headers.c>
# Set Vary:Accept header for the image types handled by WebP Express.
# The purpose is to make CDN cache both original images and converted images.
SetEnvIf Request_URI "\.(jpe?g)" ADDVARY
Header append "Vary" "Accept" env=ADDVARY
</IfModule>
Thanks for taking the time to look at this, my problem was on some iOS devices with safari and some windows machines with edge. The local test was made from a broken image I download from an edge browser and try to open the file.
Any way the problem is fixed for now I am sure you will make the best adjustments in the future so the plugin will work for all (almost) 🙂
My workaround is to add an exception so cloudflare will not cache jpgs which get corrupted some how after some time… wierd but was analyzed in 2 posts in their community
-
This reply was modified 7 years, 5 months ago by
paratame.
I now looked into Cloudflare. I have created a new “I am on Cloudflare” section in the FAQ.
See also this topic:
https://ww.wp.xz.cn/support/topic/worked-on-staging-but-not-working-on-production/
Also, I have fixed the .htaccess-rules in the new 0.9.0 release, so the Vary: Accept header is also send to browsers (and CDNs) that does not send “image/webp” in the “Accept”-header