Codec algorithms
How AV1 Compression Works in AVIF Images
A plain-language look at AV1 image coding, quantization, and how AVIF stores the result.
AVIF and AV1 are related, but not the same thing
AVIF is an image format built on the AV1 video codec and the HEIF file container. The container describes how image data and related information are stored; AV1 describes how the image is compressed.
For a still image, AV1 can use techniques such as prediction, transform coding, quantization, and entropy coding. These steps help represent image data with fewer bits. AVIF can also store features such as transparency and high bit depth, depending on how the image is encoded.
A simplified view of AV1 image encoding
An encoder divides an image into blocks. It predicts pixel values from nearby image content, encodes the difference, transforms that information, and quantizes coefficients. Entropy coding then represents the remaining symbols compactly.
flowchart TD
A[Image samples] --> B[Partition into blocks]
B --> C[Intra prediction]
C --> D[Prediction residual]
D --> E[Transform and quantization]
E --> F[Entropy coding]
F --> G[AV1-coded image data]
G --> H[Stored in an AVIF container]
Quantization can discard information in lossy settings. The encoder balances quality and size, and the result depends on the source image, bit depth, chroma sampling, and encoder choices. Lossless AVIF encoding aims to preserve image samples, but it may not make every image smaller.
Why AVIF files can be efficient
AV1 was designed with modern compression tools, and AVIF can produce compact images at useful visual quality. That does not mean every AVIF will be smaller than every JPEG or WebP. Photos, illustrations, screenshots, and transparent graphics behave differently.
Encoding can also take longer than decoding. If you are preparing many images, compare processing time as well as file size and appearance.
Check support before you choose it
AVIF support varies across software and workflows. Modern browsers support it, but a legacy editor, upload form, or recipient's device may require another format. Keep the original file and test the exported AVIF in its intended destination.
For a fair comparison, use the same source image, check dimensions and transparency, and view each export at its final display size. A smaller file is useful only when it remains compatible and looks right.