What is AVIF?
AVIF is an image format based on the AV1 video codec that compresses photos and graphics efficiently and supports transparency, HDR and wide color gamuts.
By Rocco Bombardieri · Updated
Want the full walkthrough? Read: WebP vs PNG for logos and graphics →
Explained in more detail
AVIF stands for AV1 Image File Format. It stores an image compressed with the AV1 video codec, developed by the Alliance for Open Media, inside a container based on HEIF, which is itself based on the ISO base media file format.
Compared with JPEG, AVIF can reach similar visual quality at smaller file sizes; MDN describes lossy AVIF as offering excellent lossy compression. Results vary by image and encoder. It supports an alpha channel (as an auxiliary image), 8-, 10- and 12-bit color depth, wide color gamuts and high dynamic range, and it can be lossy or lossless.
The trade-offs are tool support and encoding cost. Encoding can be slower than for JPEG, which matters for large batches. Current versions of the major browsers support AVIF, but MDN lists minimum versions (for example Safari 16.1 and Edge 121) and advises providing a fallback. Older software, image editors and many upload forms may not accept it. Check current support tables before depending on it.
Browser canvas encoding is the other practical limit. Browsers are required to support PNG for canvas exports, but support for encoding other types varies, and a type the browser cannot encode falls back to PNG. For that reason Triim's in-browser converter covers PNG, WebP and JPEG, not AVIF.
Use AVIF when you control the delivery pipeline and want the smallest files for modern browsers. Keep a PNG or JPEG fallback for everything else.