Loosy compression on PNG in Polish?


Is there any way to make loosy compression on PNG files in Polish? If not, is this a feature you are planning to implement?

JPG files are not always the best choice as the image format. Sometimes you have photo with some label on it (text on colored background). Loosy PNG is the optimal solution for this kind of task.


The numbers in the sample used in this blog post show an average gain of 38% when Polish with WebP is used for PNG images in lossless optimization, against 47% for JPEG images in lossy mode. Perhaps not ideal, but not bad either, specially considering that the initial size of a PNG image would be smaller than its JPG equivalent.


Thanks for reply. I’ve tried several PNG files with sizes > 500 KB. Cloudlfare lossless PNG compression with 24 BPP make files about 100-150% bigger in size than i.e. TinyPNG lossy 8 BPP compression. I think it would be nice feature to add lossy PNG compression to rely only on one service :slight_smile:

At the moment I have CF PRO plan, switched off Polish in “Speed” tab and use Page Rules so that JPG files are compressed with CF and PNG files are compressed with other service and served via CF. Is there a way to add WebP optimization in Page Rules to JPEG and PNG files?

1 Like

I’m not a user of Polish, but what I understood from that post and other Cloudflare documentation on the issue is that it will serve WebP files whenever the browser is ready for the format. It won’t change the filename, though, so you’d have a JPG file named file.jpg served in WebP format but still named file.jpg. The file format is added in the HTTP header “content-type”. So as long as Polish is turned on, it would generate the WebP formats for both JPG and PNG files. You can see how this works in this reply to another question on Polish here in the forum:

1 Like
closed #5

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