What is AVIF?
AVIF stores a still image using AV1 video compression inside a HEIF container. It produces the smallest files of any widely supported image format — commonly 30–50% below a comparable JPG — and supports transparency, HDR and wide colour.
AVIF at a glance
- MIME type
- image/avif
- File extensions
- .avif
- Specification
- AV1 Image File Format, Alliance for Open Media, built on ISO/IEC 23008-12 (HEIF)
- Compression
- Lossy and lossless, using AV1 intra-frame coding. Royalty-free.
- Transparency
- Full alpha channel.
- Animation
- Supported by the format, though tooling for it is still uneven.
- Colour depth
- Up to 12 bits per channel, with HDR and wide colour gamut support.
- Metadata
- EXIF and XMP.
- Support
- Chrome 85, Firefox 93, Safari 16.4 and Edge 121 and later. Support outside browsers — email clients, office software, older phones — is still thin.
Strengths and weaknesses
- The best compression available in a format browsers actually support.
- Handles gradients and flat colour without the banding JPG produces.
- Royalty-free, unlike HEIC, which is why browsers adopted it.
- Encoding is slow and CPU-hungry compared with JPG or WebP.
- Very little support outside the browser; do not send AVIF to someone as an attachment.
- Older Safari and Edge versions still in use show nothing at all.
AVIF versus WebP in practice
AVIF wins on size, particularly on smooth gradients and low-detail images, where it avoids the blocking that JPG and to a lesser extent WebP produce. WebP wins on encoder speed and on compatibility with software outside the browser.
A reasonable rule: AVIF for images you serve from your own pages where you control the fallback, WebP where you want one file that behaves everywhere, JPG or PNG for anything that leaves your site.
Why AVIF conversion takes longer
AV1 encoders search a much larger space of prediction and partition choices than a JPG encoder does. That search is what buys the smaller file, and it costs seconds rather than milliseconds on a large image.
For a single photograph the wait is unremarkable. For a batch of a hundred images it is the difference between a moment and a coffee break, which is worth knowing before you pick the format.
Working with AVIF files
Convert to AVIF
Convert or edit a AVIF file
Formats people compare this with
- WebPWebP is an image format developed by Google that offers both a lossy and a lossless mode, supports transparency and animation in either mode, and is typically 25–35% smaller than a JPG of comparable quality..
- JPGJPG (also written JPEG) is a lossy image format that discards visual detail the eye is least likely to notice, which is why photographs stored as JPG are typically 5–15 times smaller than the same image stored losslessly..
- HEICHEIC is the format an iPhone saves photos in by default: HEVC-compressed images inside a HEIF container, roughly half the size of the equivalent JPG, and unreadable by most software that is not made by Apple..
- PNGPNG is a lossless image format: it stores every pixel exactly as it was saved, supports a full alpha transparency channel, and never degrades no matter how many times the file is opened and saved again..