Fetch non-webp Image?

I have the “Polish” setting enabled to serve images as WebP when the situations is just right - supported by the client, image size is smaller than the source image, etc. It works really nicely :slight_smile:

There are several situations where I need to get the original image that is the underlying PNG or JPEG and not the WebP version. Is there a way to tell Cloudflare to send me the source image without turning the caching off temporarily? I am OK with doing it programmatically via JS by setting the appropriate headers, for example.

Thanks,
Kirupa

Perhaps you can insert some query string at the end of the URL (e.g. format=ori) and then create a page rule to disable the cache for URLs matching the query string. This should return the original image from your host.

You should be able to do that just by sending a modified Accept request header without Webp present when requesting the image.

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.