Webp not supported on safari

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

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

https://support.cloudflare.com/hc/en-us/articles/360000607372-Using-Polish-to-compress-images-on-Cloudflare

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 Likes

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?

1 Like

Hello

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

and still Cloudflare is servicing WebP for Safari browsers.

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).

1 Like

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 Nginx Serving WebP Images Conditionally Demo and I use my own written batch image conversion script for making a copy of my images as webp GitHub - centminmod/optimise-images: Batch image resizer, optimiser and profiler using ImageMagick convert, OptiPNG, JpegOptim and optional ZopfliPNG, Guetzli and MozJPEG..

An example of optimise-images.sh nginx mode batch webp conversion with generated lazy loaded gallery page too optimise-images/examples-optimise-webp-nginx-300417.md at master · centminmod/optimise-images · GitHub

HTH

2 Likes

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.

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

Thanks @eva2000

Created a Cloudflare support ticket.

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.

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?

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

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