To serve images uploaded to Cloudflare Images, you need three pieces of information:
- Your Images account hash.
- Image ID.
- Variant name.
Assuming you have at least one image uploaded to Images, you will find the basic URL format on your Images Dashboard:
A typical Image Delivery URL looks like this:
In this example, you need to replace
<ACCOUNT_HASH> with your Images account hash, and the
<VARIANT_NAME> to begin serving images. To find this information, click the Preview button next to the image you want to serve. This will open a preview of the image with an Image URL you can copy. This link will have a fully formed Images URL. Here is an example of what that looks like:
In this example:
ZWd9g1K7eljCn_KDTu_MWAis the Images account hash.
083eb7b2-5392-4565-b69e-aff66acddd00is the image ID.
publicis the variant name.
When a client requests an image, Cloudflare Images will pick the optimal format between WebP, PNG, JPEG and GIF. The format Cloudflare serves to the user is determined by client headers and the image type.
Adaptive optimized format delivery
Cloudflare Images automatically serves AVIF and WebP when the browser supports these efficient image formats, regardless of the format you upload.
The first format that Cloudflare Images will try to serve is AVIF. It will fall back to WebP if the browser does not support AVIF. If the browser does not support either AVIF or WebP, Cloudflare Images will default to serving the .
Serving images from custom domains
Image delivery is supported from all customer domains under the same Cloudflare account. To serve images through custom domains, an image URL should be adjusted to the following format:
Example with a custom domain:
In this example,
<VARIANT_NAME> are the same, but the hostname and prefix path is different:
example.com: Cloudflare proxied domain under the same account as the Cloudflare Images.
/cdn-cgi/imagedelivery: Path to trigger
ZWd9g1K7eljCn_KDTu_MWA: The Images account hash.
083eb7b2-5392-4565-b69e-aff66acddd00: The image ID.
public: The variant name.