AVIF by default: what it took to flip the switch
As of edge release 2026.09, any request with fmt=auto from a browser that advertises AVIF support gets AVIF back. Until now, we served WebP to everyone and AVIF only when you asked for it explicitly. This post covers why it took us this long and what changed.
The case for AVIF was never file size
We have known for a while that AVIF beats WebP on bytes. Across a sample of 200,000 customer images, AVIF at matched perceptual quality was 21% smaller than WebP and 58% smaller than a well-tuned progressive JPEG. The problem was encode time: our first AVIF renders took four to six times as long as WebP, and a slow first render is exactly what people notice on a product launch.
Making encodes fast enough
Three changes got p95 AVIF first-render time from 690 ms to 140 ms for a typical 1200-pixel product image:
- Speed preset per size. Small outputs (under 400 px) use a slower, higher-effort preset because they are cheap anyway; large outputs use a faster one.
- Tiled encoding. Images above two megapixels are split into tiles encoded in parallel across cores.
- Render once, serve both. When a variant is first requested we encode WebP immediately and schedule AVIF in the background, so the very first visitor never waits on the slower encoder.
Retuning quality
Our original AVIF default of q=60 came from a quick visual comparison. We replaced it with a per-format target based on a perceptual similarity score, calibrated against a panel of 1,200 human judgements. The new default, q=52, is visually indistinguishable from the old one for 96% of images and 18% smaller on average.
Browsers that don’t quite mean it
A handful of embedded webviews advertise image/avif in their Accept header but fail to decode 10-bit or alpha AVIF files. We now keep a short allow-list of user-agent families where we fall back to 8-bit AVIF without alpha. If you see an image that renders in Chrome but not in some in-app browser, tell us — that list is maintained by hand.
What you need to do
Nothing. If you already use fmt=auto, your visitors started receiving smaller files on 16 September. If you pin fmt=webp, consider switching:
- https://cdn.imgcourier.online/acme/products/lamp-07.jpg?w=800&fmt=webp + https://cdn.imgcourier.online/acme/products/lamp-07.jpg?w=800&fmt=auto
Questions or odd results: support@imgcourier.online.