AVIF

On this page 7

AVIF (AV1 Image File Format) is a still-image format that stores pictures compressed with the AV1 video codec inside a HEIF container, delivering markedly smaller files than JPEG at comparable visual quality. In photography and image processing, AVIF matters as a delivery format for the web: it supports 10-bit and 12-bit color, HDR transfer functions, wide color gamuts, an alpha channel and both lossy and lossless coding.

The format was specified by the Alliance for Open Media, the consortium behind AV1, and is designed to be royalty-free. It is not a camera capture format and does not replace RAW files; it is an output format for finished images, comparable in role to JPEG, WebP and HEIC.

How AVIF compresses a photograph

AVIF encodes a still image as a single AV1 intra frame, which means it reuses the spatial prediction and transform tools that AV1 applies to keyframes in video. The encoder divides the image into superblocks of 64 or 128 pixels, splits them recursively into smaller blocks, predicts each block from already decoded neighbors and codes only the residual difference.

The residual is transformed with a family of DCT and ADST transforms of several sizes and shapes, quantized and entropy coded. Because AV1 offers many directional prediction modes, chroma-from-luma prediction and flexible block partitioning, it reproduces smooth gradients and edges with fewer bits than the fixed 8×8 DCT blocks of JPEG. In-loop filters, including a deblocking filter, a constrained directional enhancement filter and loop restoration, then suppress blocking and ringing artifacts.

The compressed bitstream is wrapped in the ISO Base Media File Format structure defined by HEIF. This container carries metadata items such as EXIF and XMP, an ICC color profile or CICP color signaling, the alpha plane as an auxiliary image, and optional image grids or sequences.

The following table summarizes the main building blocks of an AVIF file and what each contributes.

ComponentRolePractical effect
AV1 intra frameStores the compressed pixel dataHigh efficiency at low bitrates
HEIF containerOrganizes images and metadata itemsSupports grids, sequences and thumbnails
Alpha auxiliary imageHolds transparency separatelyClean cutouts without a matte
Color signalingICC profile or CICP valuesCorrect rendering of Display P3 or BT.2020
Metadata itemsEXIF and XMP blocksKeeps capture data and copyright notices
Components of an AVIF file

Key parameters of AVIF encoding

The visual result of an AVIF file depends on a small set of encoder settings, and the quality or quantizer setting has the strongest influence. Encoders such as libaom, SVT-AV1 and rav1e expose similar controls under different names, so values are not directly portable between tools.

ParameterTypical rangeWhat it affects
Quality or quantizer0 to 63 quantizer, or 0 to 100 qualityFile size and fine detail retention
Bit depth8, 10 or 12 bitsBanding in gradients and HDR headroom
Chroma subsampling4:2:0, 4:2:2 or 4:4:4Color edge sharpness and file size
Encoder speed0 (slowest) to 10 or moreCompression efficiency versus encoding time
Film grain synthesisOff or a grain tableGrain is modeled instead of coded
TilingOne tile or severalParallel decoding and memory use
Encoder settings and their effect

Encoding speed is a real cost. At slow presets, encoding a 24-megapixel photograph can take several seconds or longer on a desktop processor, whereas JPEG encoding is nearly instantaneous. For batch exports from editing software, a medium speed preset usually gives most of the size benefit at a fraction of the time.

Film grain synthesis deserves special attention in photography. Instead of spending bits on random grain, the encoder can remove it, store a compact statistical description and let the decoder regenerate similar grain. This saves considerable space on high-ISO images, but the regenerated grain is not pixel-identical to the original.

AVIF compared with other image formats

AVIF competes most directly with JPEG, WebP and HEIC as a format for finished images, and each has a distinct balance of efficiency, compatibility and features. HEIC uses the same HEIF container but carries HEVC-coded data, which raises patent licensing questions that AVIF was designed to avoid.

FormatCodec basisMax bit depthTransparencyTypical size versus JPEG
JPEGDCT, 1992 standard8 bitsNoBaseline
WebPVP8 intra frame8 bitsYesAbout 25 to 35 percent smaller
HEICHEVC intra frame10 bits commonYesAbout 40 to 50 percent smaller
AVIFAV1 intra frame12 bitsYesAbout 40 to 60 percent smaller
PNGLossless deflate16 bitsYesUsually much larger for photos
Comparison of common delivery formats

The size figures are approximate and content dependent. Savings are largest at low and medium quality, where JPEG shows visible blocking, and shrink at very high quality, where all formats must preserve fine texture. AVIF also tends to smooth fine detail such as foliage or skin pores at aggressive settings, a different failure mode from the blocky artifacts of JPEG.

When to use AVIF in a photographic workflow

AVIF is most useful at the end of the processing chain, after RAW development, retouching and color grading are complete. It should not serve as an editing intermediate, because every lossy re-encode adds generational loss.

SituationRecommended choiceReason
Portfolio website with many large imagesAVIF with JPEG fallbackFaster page loads with broad compatibility
HDR photo for modern displaysAVIF at 10 bits with PQ or HLGPreserves highlight range and wide gamut
Product photo needing transparencyAVIF or WebP with alphaSmaller than PNG with clean edges
Print delivery to a labTIFF or high-quality JPEGLabs rarely accept AVIF
Archive of edited mastersTIFF, PSD or DNGLossless and widely supported
Choosing a format by situation

On the web, the standard practice is to serve AVIF through the HTML picture element or content negotiation, with WebP or JPEG as fallback. Current versions of the major browsers decode AVIF, but email clients, older operating systems and some social platforms still re-encode or reject it.

Limitations and common mistakes with AVIF

The main limitations of AVIF are encoding cost, uneven software support outside browsers and a maximum frame size that forces large images into tiled grids. A single AV1 frame in the common profiles is limited to roughly 8,192 by 4,352 pixels, so high-resolution photographs are stored as grids of tiles that the decoder reassembles.

  • Using 4:2:0 subsampling for graphics blurs saturated color edges; text overlays and logos look better at 4:4:4.
  • Copying JPEG quality numbers gives misleading results, because quality scales differ between encoders.
  • Dropping the color profile makes wide-gamut images look desaturated or oversaturated in some viewers.
  • Exporting 8-bit HDR causes visible banding; HDR delivery needs at least 10 bits.
  • Stripping metadata carelessly removes copyright and capture information along with location data.

Progressive display is another weak point. JPEG can render a coarse preview while loading, whereas AVIF traditionally decodes only when the full frame has arrived, although the progressive layered coding added to recent specifications can mitigate this where decoders support it.

A plain-language summary

AVIF is a newer way to save a finished photo so that it takes up much less space than a JPEG while looking about the same. It borrows the clever compression used for modern online video and applies it to a single picture.

It also handles things JPEG cannot, such as transparent backgrounds and the extra brightness of HDR screens. The trade-off is that saving an AVIF takes longer, and not every program can open one yet. Think of it as a very efficient suitcase: it fits more in, but not every airport has the right trolley for it.

An example from practice

A landscape photographer runs a portfolio site with 120 images, each exported from Lightroom as a 2,400-pixel-wide JPEG at quality 85, averaging about 900 KB. Visitors on mobile networks complain that gallery pages load slowly, and the hosting plan is close to its bandwidth limit.

The photographer exports the same images as 10-bit AVIF at a medium speed preset, keeping the Display P3 profile, and serves them with a JPEG fallback through the picture element. The average file drops to about 350 KB, sunsets show less banding in the sky gradients and the gallery page weight falls by more than half. The result is noticeably faster loading on phones, while the original JPEGs remain available for older browsers and for print orders.