Image delivery
Understand how Image Processor picks the delivered format, how it caches one entry per transformation, and where it stops.
An image built on request still has to reach the browser in a format it reads, and be built once rather than for every reader. In an Application, Image Processor is the Platform Resource that builds that image, the derived image, from the source image on the origin. How a request becomes a derived image, with the diagram of that chain, is on the Image Processor overview.
The sections cover how the delivered format is chosen, how the cache tells one derived image from another, and where Image Processor stops.
Format negotiation
The delivered format can differ from the format of the source image. Two mechanisms change it, and they behave differently.
The first is explicit. A filters:format() filter in the ims string asks for a named output format, and the response carries that format whatever Accept header the request sent, or with none.
The second is automatic and needs no ims parameter at all. Image Processor detects which formats the browser supports and, when possible, converts the image to one of them, such as WEBP or AVIF. A BMP image is converted to JPEG or WEBP depending on the same support. For example, a request whose Accept header lists image/webp, with no query string, can receive image/webp for a source image stored as PNG. A response can carry a format other than the one on the origin even when the URL has no filter.
So the bytes on the origin and the bytes on the wire are two different measurements, and the response says so. A processed response carries x-ims: Enabled, and x-original-image-size carries the size of the source image before the transformation. Read these headers before you compare a response with the file on the origin. For the headers, refer to Image Processor settings.
One cache entry per transformation
A derived image is worth building only once. The practice for the cache setting that serves images is to vary the cache on ims: its cache_vary_by_querystring field takes the allowlist behavior, with ims in fields. Each distinct ims string then has a cache key of its own. That field sits under modules.application_accelerator in the cache setting, so varying the cache on ims requires Application Accelerator, while processing an image does not. Image Processor settings maps each of these fields to its control in Azion Console.
A cache setting created with that allowlist reads back with this modules object:
The cache key of a derived image converted to another format also carries the format at the end of the key, with no separator, as in httpsstatic.example.com/static/images/image_1.jpg@@?ims=880xwebp.
That key has a cost, and the cost is cardinality. Every distinct ims string, in each delivered format, is a distinct stored object. A page that asks for arbitrary widths stores an object per width and format, while a page that asks for four fixed widths stores four per format. So choosing a small set of sizes is a caching decision as much as a layout one.
It is also a billing decision, because the monthly Images meter counts the images that Image Processor processes, not the images that the cache serves. So a derived image that stays in cache is counted when Image Processor builds it, not each time a reader receives it. The cache can remove a little-used object before its maximum age ends, and the next request for that image is processed and counted again. For the rate, refer to Pricing.
Where Image Processor stops
Image Processor reads a source image from the origin and returns a derived one without saving it as an asset of the account. You cannot upload images to Image Processor: the source image stays wherever it already lives, and the cache holds the derived images. A workflow that needs to keep a transformed file has to save the response itself.
What the ims string can express, and the size of the image, bound the transformation. The operations the string accepts are on Image Processor URL parameters, and the maximum size and dimensions are on Applications limits.
One boundary is worth naming, because two surfaces share a name. WASM Image Processor is a WebAssembly library that processes images inside a Function. It runs in the code of that Function, separately from the Image Processor Platform Resource and everything this page describes.