Polish not converting images to webp when uri had no extension or contains query string?

Tests performed with both Firefox and Chrome. Although the setting Polish setting is set to Lossy and webp I have also tried using the Lossless setting. Flushing both individual resources and purging the entire cache had no effect.

I’m having a problem with some uris where they simply are not converted to webp and contain no cf-polished header. Removing the query string doesn’t seem to have an effect.

Here is one example of many that works showing the additional headers by polish:
Request URL: https://asite.io/s/pages/home/images/categories.png
cf-polished:origFmt=png, origSize=61422
content-disposition:inline; filename=“categories.webp”

:wave: @kiwiant,

Cloudflare caches based on file extension. https://support.cloudflare.com/hc/en-us/articles/200172516-Which-file-extensions-does-Cloudflare-cache-for-static-content- So the file in the example below is not being cached at all.

Polish is run on cached objects in an asynchronous process so an object like the example above wouldn’t be cached/polished. And it’s likely the async process also runs based on file extension not metadata headers, so even if cached in the current state with a cache everything page rule I would guess it wouldn’t be polished.


Thanks @OliverGrant for confirming my suspicions. It’s a shame the content-type header isn’t used if there’s no extension.

Actually, though the documentation @OliverGrant linked to and other pages on the support section mention caching by extension, I just tested uploading a JPG image without extension, and setting the header for content type as “image/jpeg” and it was, in fact, cached.


You may want to check your settings to see why the image is not being cached (perhaps you have No Query String set as your Cache Level), or somehow create specific page rules to cache the extensionless images and see if that works in term of WebP conversion.

EDIT: I just did the test again on a domain with Polish enabled, and I was able to have a JPEG image without the file extension and with a query string get cached, polished, and converted to WepP format.