Media type · image/avif
image/avif
AVIF images built on the AV1 codec, with alpha and HDR support.
Key facts
| Type | image/avif |
|---|---|
| Codec | AV1 |
| Container | ISO BMFF |
| Features | Alpha, HDR, wide gamut |
| Extension | .avif |
| Support | Modern browsers; older ones need fallback |
What AVIF buys you
AVIF compresses still images with AV1 intra-frame coding. It supports transparency, HDR and wide-gamut color in a single file, and often beats JPEG at the same perceptual quality. The cost is encoding time and less universal decoding support than JPEG.
Serving with a fallback
Use <picture> with an AVIF source and a JPEG or WebP fallback, or content negotiation with the Accept header. Always include width and height to avoid layout shift. Check that your CDN preserves the Vary: Accept header if you negotiate on the server.
Frequently asked questions
Is AVIF better than WebP?
It usually compresses better at the same quality, especially at low bitrates, but encoding is slower and support is narrower.
Does AVIF support animation?
The AVIF specification supports image sequences, but browser and tool support is uneven.
Can I use AVIF for everything?
Not yet. Keep a fallback for older browsers and for tools that cannot decode AVIF.