Polish is not converting images to WebP

Hi

If you look at this URL, the images are showing as JPEG not WebP. I have Polish set to Lossless and WebP ticked.

I dont understand why it is not working. On the network tab in the inspector I am not seeing anything next to these images to suggest Cloudflare is even considering whether it should serve the image as webp or not.

On my website I do use smush pro and have got the webp feature disabled. Can anyone help?

This is one of the URLS:
[Tyffany Wave Browband](https://www.pinkequine.com/design-your-own-tyffany-wave-browband/)

1 Like

Hi thanks for the reply, I’ve tested on both firefox and chrome so I dont think thats it I’m afraid.

Cloudflare will not convert from JPEG to WebP when the conversion would make the file bigger, or would reduce image quality by more than it would save in file size.

If you choose the Lossless Polish setting, then WebP will be used very rarely. This is due to the fact that, in this mode, WebP is only adequate for PNG images, and cannot improve compression for JPEG images.

The problem is: You’re already using smush to optimize your images and you’ve selected lossless. You should choose between smush or polish. There’s not much sense and advantages in using both.

My personal recommendation is: Use Polish with Lossy and Webp and deactive smush optimizations. Or simply use smush alone.

2 Likes

Hi thanks for that, I will try lossy, but if there is too much reduction in quality then its probably not an option

You’re welcome.

What do you want to achieve? A better compression? Just serve webp?

Tell us, so we can help you better.

2 Likes

Hi

I am trying to improve page speed, I am currently compressing all the videos and re-uploading those, but according to pagespeed insights I am losing 5.8s due to not serving images in next gen formats

https://pagespeed.web.dev/analysis/https-www-pinkequine-com-design-your-own-tyffany-wave-browband/ziq7gterbk?form_factor=mobile

I have now set polish to lossy and webp and still all my images are being served as jpeg. I am just wondering if I have a setting wrong, or something on my server side that is preventing these images getting served as I need them to.

I had used Smush Pro in the past with webp, but I am now on a Kinsta server which uses Nginx and the rules seem to be intermittently failing. Hence me setting up Polish.

Help wise, I would be so grateful if you could take a look at the network inspection on the images and see if it looks like Cloudflare is choosing not to serve the images as webp for some reason. I did have it working and hadn’t changed any settings but now its not working on anything either png or jpeg.

Taking as an example one image on this page was uploaded at 215kb and smush-webp version is 153kb, all of the images are the same size, so they should all be served as webp.

I would appreciate any help so I can finally get this sorted.
Thanks in advance

for clarification we are an image heavy ecommerce website

Hello!

I’m getting a mix of WebP and Jpeg images when I visit your website. It is probably happening as I said… Cloudflare is converting the images to WebP if they are going to be smaller in size than JPEG. Otherwise they remain as JPEG.

I took a look at your images, and most of them are sharp and really nice. A few is a bit blurry, but I don’t think it is too much for a costumer… I would advise to preload critical css and the first image with Early Hints. They are not heavy… So you can also combine the CSS files and preload with Early Hints.

But getting to the point… I suggest you to try Plus WebP – WordPress plugin | WordPress.org and test the results. It will convert your images to webp and add the correct codes into your html pages, so the browser will choose if it will load WebP or Jpeg, according to its compatibility. You can choose the final quality of the image, be it 100% or less in the settings.

You can optionally force only WebP with this plugin, but I don’t think that is your goal.

Some other things I would advise:

Set an explicit width and height on image
— Wordpress should do this by default… Did you installed some plugins that alter this?

Some of your scripts are not deferred/async

— You can use Async JavaScript – WordPress plugin | WordPress.org to do this work for you and disable Rocket Loader. And enable minify HTML CSS and JS at Cloudflare. If this break something, you can create a Rule to explicit disable them where needed.

And you should lazy-load off-screen images if you want better performance.

I also did not get any 300x images… Are they turned off?

Next, I’ll ask you to please reply directly to my comment, so I can get a notification.

Cheers!

2 Likes

Wow, thank you for taking the time to give such a detailed response. I am not seeing any webp at all, it must be something my end. I set Polish to lossy, so that may be the cause of some of the image issues.

I’ll enable early hints.

The problem I am finding with wordpress plugins is getting them to work with the nginx server, this was my problem with smush pro also, but I havent tried Plus WebP so thats definitely woth a shot.

In terms of the width and height, I may have overriden this in my own css, to fit with the video slider, but I will have to check that, I am not 100%.

My images are meant to lazyload but I have just changed the slider so I probably need to look at what thats doing.

I havent explicitly turned off the 300x images but if you mean the product listing I have set that to a different width x height so that might be why you arent seeing them

Thank you again for your response, I’m still not sure why I am not seeing the webp from my side though, thats a bit strange

1 Like

Glad I could help.

Try to clear your browser cache or open the network tab and mark the disable/ignore cache then reload the page. You should see a mix of webp/jpeg.

1 Like

As I don’t known how you have tested it… Something that I have forgot to tell you: Cloudflare will not change the file extension in the URI. So, you’ll still see the .jpg/.jpeg, But it is actually served as WebP.

1 Like

Ahhh Thanks I can now see webp!!! Thank you so much for all your help!

1 Like

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