Skip to main content
Omit f and Openinary picks the format from what the browser accepts: AVIF where possible, WebP next, JPEG or PNG otherwise.
That one URL serves a different format to each browser, and each one is cached separately.

How it works

1

Detect browser support

Reads the Accept header and User-Agent to determine which modern formats the client accepts.
2

Pick the best supported format

Takes the first format the browser supports, in this order:AVIF → WebP → JPEG / PNGPNG originals stay PNG when neither AVIF nor WebP is available, so transparency survives.
3

Encode once and cache

Encodes to that single format at a quality chosen for it, then stores the result. Every later request for the same URL is served from cache.
The choice comes from browser support alone. Openinary does not encode several candidates and compare their sizes unless you ask for f_auto, and it does not inspect image content to pick a codec.

Comparing candidates with f_auto

f_auto opts into the slower, thorough path: Openinary encodes the image in every format the browser supports, compares the actual byte counts, and serves the smallest.
It costs more CPU on the first request for a URL, so it earns its keep on images served at high volume, where the cached winner is reused indefinitely. For everything else the default path is the better trade.

Quality defaults

With no q, quality follows the chosen format rather than a single fixed number: Large files shift this by a few points, and the result is clamped to the 70 to 95 range. An explicit q between 1 and 100 is used exactly as given.

Typical size reductions

Actual savings depend on the image and how well it was already compressed.

Manual format override

Use the f parameter to force a specific format regardless of browser support.

Next steps

Image Transformations

Full reference for resize, crop, rotate, and format parameters.

Upload & Cache Warming

Pre-generate optimized variants at upload time.