Webp not supported on safari

wordpress

#1

Hello

I am on Free Plan.
And I noticed images are not loading on safari.

Even when image extension is .jpg the content-type is image/webp which is not rendering on safari.

How can i disable auto image optimisation to webp for all images.

Thanks


#2

Cloudflare probably isn’t the one doing the image optimization - CF only optimizes images to WebP for users on the Pro plan or better.

The image you’re returning is probably a webp itself, and you’ll need to use a converter to actually convert the content of the file from webp to jpg or png.


#3

Just because the file extension is “.jpg” doesn’t mean it the browser will render it as such. For the most part file extensions on the web are meaningless, however, the file headers are the most relevant information for the browser. For example if you have a png file and name it as jpg, the browser will ignore the extension and render the png correctly.

Cloudflare should be able to detect which clients are capable of webp and thus only use the webp version when its likely to work. It seems there may be another issue, perhaps you can provide some more info?


#4

Hello

Safari does not support WebP image format. https://caniuse.com/#feat=webp

and still Cloudflare is servicing WebP for Safari browsers.


#5

You said you are a free user - this means you don’t have access to Polish, which is how Cloudflare would do image optimization if you turned it on. This means Cloudflare isn’t the one doing this optimization.

You need to actually convert that webp to a jpg file, and not just change the file extension (like @Findmate said).


#6

Yeah if on free plan, then you’d need to ensure your origin web server can properly serve webp images to only web browsers that support it. You seem to be using Nginx for origin web server, so very easy to setup browser conditional webp image serving at Nginx level. You just also need to convert and make a copy of images as webp too. This is how I do it on my Centmin Mod Nginx server for browser conditional webp serving at Nginx level at https://centminmod.com/webp/ and I use my own written batch image conversion script for making a copy of my images as webp https://github.com/centminmod/optimise-images.

An example of optimise-images.sh nginx mode batch webp conversion with generated lazy loaded gallery page too https://github.com/centminmod/optimise-images/blob/master/examples/examples-optimise-webp-nginx-300417.md

HTH


#7

Thanks for your input.

but I am pretty sure webp optimization is happening from cloudflare’s end.

You said you are a free user - this means you don’t have access to Polish, which is how Cloudflare would do image optimization if you turned it on. This means Cloudflare isn’t the one doing this optimization.

This is being done by Cloudflare, I dobule checked after disabling the Cloudflare.

You need to actually convert that webp to a jpg file, and not just change the file extension (like @Findmate said).

Server does not have WebP images and we don’t need WebP images optimization right now.


#8

If you are on CF free plan and see webp only when Cloudflare orange cloud enabled on your host and not when you disable orange cloud/cloudflare, then it could be a bug so will need to contact Cloudflare support to report it


#9

Thanks @eva2000

Created a cloudflare support ticket.


#10

That seems extremely unlikely. In order for that to be true, Cloudflare would need to both be offering you a service not enabled or available on your plan and be doing in a way that the feature doesn’t actually behave.

You may not need it but you almost certainly have a utility on your origin which is doing on-the fly conversion on the origin though as others have stated.


#11

I’m definitely not getting the WebP content type header for images that are jpg. I’m pretty sure the issues likes on your server. Is there perhaps some other layer between your server and CF? Like an apache/nginx module?


#12

Can you post the url of a page containing the image? Or directly of the image?


#13

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.