Polish WebP optimization apparently not working



my blog has a lot of images as in this very complex page:


I have Polish with WebP active on my CloudFlare service:

Google Page Speed tells me that I am not using WebP:

The same evidence, images served with original formatinstead of WebP, testing with Chrome:

Any guess of what is wrong and why ?




Are you using lossy or lossless mode? I ask because Polish won’t convert PNG and GIF files in lossy mode, only in lossless mode. Also, webp is not recognized yet in some browsers, such as Safari, and Cloudflare will take that in consideration when delivering a page.



I am using Lossy at the moment:

Let my try to change to Lossless and I’ll let you know.

Thanks for now !

1 Like

Change done, cache purged but still no WebP generation after 24 hours:


The status claims “not_needed”, so I’d assume the converted file would not be smaller.


Hello Sandro,

why does Google PageSpeed Insight quite different opinion ?


  1. That is a question for Google, not Cloudflare or the forum here.
  2. They do not seem to actually analyse anything but only make a general statement - “Image formats like JPEG 2000, JPEG XR, and WebP often provide better compression than PNG or JPEG”
  3. If Cloudflare says it is not needed, it is not needed by their definition. Maybe there is still room for optimisation. Nobody knows, but Cloudflare does not think so.
$ wget https://lamiacasaelettrica.com/wp-content/uploads/2018/10/Screenshot_20181102-075818.png
$ ffmpeg -i Screenshot_20181102-075818.png -lossless 1 lossless.webp
$ ffmpeg -i Screenshot_20181102-075818.png -lossless 0 lossy.webp



There might be something with Cloudflare’s version of libwebp (if they use that), or they might use a different encoder if there are license issues with using webp.


Thanks for your analysis @Judge

To me it sounds that CloudFlare Polish is not optimized as it can be.


Hi @emiliano.maina,

There’s a lot of image optimization opportunities in your website, but that can only be done at the origin level. For instance, your website has many PNG images that should have been originally saved instead as JPEG or GIF. I’ll give you two examples:

This image has photographic content. PNG, like GIF, should not be used in images with photographic content. The format for photographic images is JPEG, which is a compression format created specifically for photography. Then of course you can use lossy mode and enable webp.

Just by opening the image above and saving it as JPG, without any change other than set the quality level at 65%, the image size shrunk from 146 KB to 16.3 KB, ~ 1/9 of the original size without any loss in quality.

The PNG format locks in the image in a lossless mode that won’t be touched by Polish, which will only strip off any EXIF data attached to the image.

Also this image:

How many colors can you see there? I only see two, though there might be a few shades of grey in it, not sure. But the image carries 16.4 million colors (24 bits per pixel). By converting it to GIF with 8 bits per pixel, the size was reduced from 9.1 KB to 4.9 KB. Then I reopened as GIF and saved it again as PNG and it squeezed even more, to 4.64 KB. And I’m sure both this image and the JPG image above would be reduced even further if I had used a professional image manipulation software, such as Photoshop or the open source GIMP.

The choice of format and some image quality settings, like the depth of colors, must be done as part of your image process workflow at the origin level. I see Polish as the final touch in this process, squeezing whatever it can without making decisions about file format.

1 Like
closed #11

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