How do I know webp is being served


I enabled webp and purged the cache.

When I check the content type of the image I see image/jpeg.

cache-control:public, max-age=691200
cf-bgj: imgq:85
cf-polished: origSize=263021, status=vary_header_present
content-type: image/jpeg

The content-type should be webp not JPEG. I am on the pro account.

Any ideas why is that?

WebP only kicks in if it’s smaller than the original. And, of course, you have it enabled in the Speed settings for Polish.

1 Like

I have enbled it in Polish of course. I’ll check it on several images and see if it works.

I checked it on 10 different images and none of them are webp.

Update: 20 images I checked, non of them are webp.

I see the original size in the header and the size is larger than the one served. But the content type os JPEG.

It could very well be that WebP can’t shrink those images any more. Here’s one of mine:

I did look at that page and see nothing is showing up as WebP. If you want someone to dig deeper, you can open a Support ticket:
Login to Cloudflare and then contact Cloudflare Support by clicking on the Get More Help button.

1 Like

The algorithm should reduce the size at least for 1 of the 20 images. Thanks for checking. I will open a ticket for this.

I took 5 random images and converted them using an online JPEG to webp converter. All were reduced in size around 30-50KB.

I also want to add that even using Google page speed tool, Google present four images and shows potential reduction in size based on processed images. Which shows that those three images, which I checked myself, can be further reduced in size using webp.

  • I submitted a ticket.

BTW, when I get a response to the ticket, where can I see it?

The presence of “status=vary_header_present” in the CF-Polished header indicates that the Vary header may somehow be affecting the processing of Polish (though I haven’t seen this documented anywhere, and it’s not listed as a common CF-Polished status here.).

I’d try to remove (unset) the Vary: X-Forwarded-Proto header and see if that does the trick. And if so, let Support know about this. (If it’s not a bug, they should update their documentation)


Do you have an example link? Or links to the images? I wouldn’t mind comparing.

Keep in mind, there is LOSSY and LOSSLESS conversion option. Google might be presenting a lossy version. I have tested lossy vs lossless, and you might be surprised how little loss of quality there is in lossy mode, yet file size is decreased substantially. You will get a MUCH HIGHER webp conversion hit rate with lossy mode, because the converted images will most often be smaller than your original JPG’s.

Conversion rate will also depend on the compression of your original JPG’s. If your JPG’s are already compressed optimally with a modern JPG tool, WEBP will struggle to beat the compression for most images. The exception would be in “lossy” mode, in which case it will likely find file size improvements, but this will also depend on your original images.

I have TWO websites using Polish, one in lossless mode and the other in lossy mode. The website in lossless mode converts few images to WEBP, because my original JPG’s are already optimally compressed. The website in “lossy” mode is for screenshots (dropshare), and offers big reductions in file size, especially for PNG type images (which WEBP does much better at a fraction of the file size). I don’t like the idea of “lossy”, but I am considering changing the “lossless” website also to “lossy” after studying the results.

1 Like

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