AVIF: the smallest photos, the slowest to make
AVIF is an image format built on the AV1 video codec. For photographs it usually produces the smallest files of any widely supported format, handles smooth gradients well and can store HDR. The trade-offs are slow encoding and patchier support outside web browsers.
AVIF at a glance
- File extensions
- .avif
- MIME type
- image/avif
- Compression
- Lossy or lossless, using AV1 video compression inside a HEIF-style container.
- Transparency
- Yes, with smooth alpha.
- Animation
- Yes, as image sequences.
- Colour
- 8, 10 or 12 bits per channel, with support for wide colour gamuts and HDR.
- Browser support
- All current major browsers. Edge was the last to add it, in 2024.
- In ImageDoctor
- Opens AVIF with the browser's own decoder, or a built-in one where the browser has none, and saves AVIF with a built-in encoder — no browser can write AVIF itself. Encoding takes seconds rather than milliseconds.
What makes AVIF small
AVIF stores a single frame of AV1 video — the codec that streaming services use for their most efficient streams. Video codecs have had decades of work put into describing natural scenes in as few bits as possible, and AV1 brings that to still images: larger, adaptive block sizes, better prediction of each area from its surroundings, and filtering that hides compression edges instead of showing a block grid.
In practice a photo that is 400 KB as a good JPEG will often be around half that as AVIF at a similar perceived quality. It is especially good at skies, skin and other smooth gradients, where JPEG tends to show banding.
The costs
- Encoding is slow. A large photo can take seconds to encode where WebP takes milliseconds. For a handful of important images that is irrelevant; for a batch of hundreds it adds up. ImageDoctor's AVIF encoder runs in your browser, so nothing is uploaded while you wait.
- Fine detail can soften. At aggressive settings AVIF smooths small textures rather than showing artefacts. That looks cleaner than JPEG's blockiness, but it is still lost detail — compare at 100% zoom.
- Support outside browsers is uneven. Browsers are covered; desktop apps, operating systems and upload forms vary. A downloaded .avif may still need converting to open in an older program.
- Small, sharp-edged graphics gain little. For icons and UI, WebP, PNG or SVG are often as small or smaller.
HDR and colour depth
AVIF can store 10- and 12-bit colour, which is enough for HDR photos and wide-gamut colour. JPEG is limited to 8 bits. Converting an HDR AVIF to JPEG therefore has to squeeze it into a smaller range, and bright highlights may look flatter or clipped. Ordinary 8-bit AVIFs — which is what most websites serve — convert without any such change.
When to use AVIF
- Large photographs on a website — hero images, galleries, product photos — where the extra saving over WebP is worth the encoding time.
- Photos with smooth gradients that band in JPEG.
When not to
- Anything you send to other people or systems. JPEG is still the format everything accepts.
- Big batches where speed matters. WebP gets most of the saving at a fraction of the encoding time.
- Icons, logos and screenshots. Use SVG, PNG or WebP.
Convert AVIF files
Each converter runs in your browser with the output format already chosen. Add one file or a whole folder.
Common questions
Tools for AVIF files
Keep reading
- The WebP formatImages on websites you controlFormat
- The JPEG formatPhotos you send, upload or printFormat
- The HEIC formatStoring photos on Apple devicesFormat
- JPG vs PNG vs WebP vs AVIF: which image format should you use?A practical comparison of the four formats that matter, what each one is genuinely good at, and how to convert between them without losing transparency.Guide
- Compressing JPEG, PNG and WebP without losing visible qualityEach format loses quality differently. A per-format playbook for JPEG, PNG, WebP and AVIF, how to spot the artifacts, and how to avoid compounding damage.Article
- How to optimise images for faster website loadingFind the images slowing a page down, fix the ones that matter, and use the HTML — srcset, lazy loading, dimensions — that turns smaller files into a faster site.Article