Any plans to match PageSpeed Insights compression with Cloudflare Polish?

TL;DR:

With Cloudflare Polish, some images are not converted to .webp even though they would save bandwith if converted with other tools. (Like PageSpeed Insights [https://pagespeed.web.dev/], or CloudConvert [https://cloudconvert.com/png-to-webp] use.) Does Cloudflare ever plan to increase the compression of their .webp images that are converted via the Polish tool?


When I test my site on Google’s PageSpeed Insights, it reports that some of the images should be optimized by converting them to .webp or .avif format. However, I am already using the Cloudflare Polish product across my site which is supposed to automatically serve my images in the .webp format. I though “what gives? Why am I still getting this recommendation/condemnation from Google?”

I found out Cloudflare Polish will not convert any image which it decides will be larger after the conversion.

In my case, I took a .png image which, according to PageSpeed Insights, should be converted to the .webp format for bandwith optimization. When I ran it through CloudConvert (https://cloudconvert.com/png-to-webp)'s image converter manually, the .png was 38KB compared to 29KB for the .webp image.

However, when running the image through Cloudflare Polish’s system…

curl -sIL URL/to/image/name.png -H "accept: image/webp"

Part of the resulting header:

cf-polished: origSize=39783, status=webp_bigger 

The image was marked as larger after going through Cloudflare Polish conversion, presumably because the conversion system they use is slightly different than Google’s. (And thus the image is left as a .png on my site.)

Cloudflare also won’t convert to webp or avif if the conversion would take longer than the time it would save by being smaller (in its opinion, based on various factors). So it optimizes for speed rather than bandwidth. It might be imperfect but the point is that converting to webp might not actually be faster even if the webp file is smaller.

Gotcha. That might be the case. Bummer, I wish there was a way to have the Google PageSpeed Insights account for that.