What is AVIF? A 2026 technical deep dive — HEIF container internals, AV1 intra coding (56 prediction modes, CDEF), profiles, 10/12-bit HDR, and design tradeoffs.
If WebP was the format that quietly cut web image sizes by a third over the 2010s, AVIF is the format quietly doing it again — this time by another half. But behind that headline number is a stack of design decisions most articles skip over: a container borrowed from HEIC, an intra-frame coder lifted out of a state-of-the-art video codec, a profile system that caps how big a single tile can be, and HDR signaling that genuinely cannot exist in WebP.
This deep dive is the technical anatomy of AVIF in 2026 — what is inside the file, how the bits are predicted and filtered, why the encoder is slow, what a “profile” actually limits, and how 10/12-bit HDR is carried. For the practical “AVIF vs WebP vs JPEG” file-size and browser-support comparison, read AVIF vs WebP vs JPEG; for the Mac conversion workflow, read Best AVIF Compression Tool for Mac. This article does not repeat either.
AVIF (AV1 Image File Format) is an open, royalty-free image format maintained by the Alliance for Open Media. It packages still images compressed with the AV1 video codec inside a HEIF/ISOBMFF container. The current published specification is v1.2.0, released on November 3, 2025.
The official extension is .avif (.avifs for animation sequences) and the MIME type is image/avif. The short version: AVIF is what you get when you take a state-of-the-art video keyframe and ship it as a still image. Everything interesting follows from that single design decision.
The Alliance’s membership is the practical reason cross-browser support arrived in five years rather than fifteen — the same companies that ship Chrome, Firefox, Edge, and YouTube agreed to AVIF before the spec was published.
AVIF’s wrapper is not new. It is HEIF (ISO/IEC 23008-12), itself a profile of the ISO Base Media File Format (ISOBMFF, ISO/IEC 14496-12) — the same family of “boxes” that backs MP4 and QuickTime. An AVIF file is a sequence of nested boxes, each prefixed with a 4-character code (4CC) and a length:
| Box | Purpose |
|---|---|
ftyp | File Type Box — declares the brand (e.g. avif for still, avis for sequence) and compatible brands |
meta | Container for all the image metadata that follows |
hdlr | Handler reference — for AVIF this is pict |
pitm | Primary Item — which item is the displayed image |
iinf | Item Info — declarations of every coded image item |
iloc | Item Location — byte offsets and lengths into mdat |
iprp | Item Properties — image size, color profile, rotation, alpha link |
iref | Item References — e.g. auxl linking the alpha plane to the color plane, or dimg linking grid tiles to a derived image |
mdat | Media Data — the actual AV1 bitstream payload |
The point is that AVIF and HEIC are the same wrapper with a different codec inside. An iPhone HEIC file is HEVC-coded data inside HEIF; an AVIF file is AV1-coded data inside HEIF. That is also why AVIF supports image grids and tiled super-images (via dimg references) and per-image properties like ICC profiles and rotation in exactly the same way HEIC does.
For the AV1 bitstream itself, AVIF stores AV1 OBUs (Open Bitstream Units) inside mdat. A decoder treats each coded image item as a single AV1 keyframe and ignores the inter-frame machinery entirely.
Inside the container is a single AV1 keyframe. AV1 is a block-based hybrid codec, and keyframe (intra) coding is what AVIF uses for every still image. Three pieces of machinery dominate the bit budget:
JPEG has effectively zero intra prediction. HEVC (and HEIC) has 33 directional modes. AV1 has 56 directional modes, generated from 8 nominal angles (45°, 67°, 90°, 113°, 135°, 157°, 180°, 203°) each refined by an angle delta in the range [-3, +3] in steps of 3°. The encoder predicts each block from neighboring pixels along the chosen angle, then encodes only the residual. More angles mean a closer-fitting prediction for diagonal edges, fine textures, and gradients — which means smaller residuals and fewer bits.
On top of the 56 directional modes, AV1 adds:
JPEG locks every block to 8×8. AV1 picks block sizes from 4×4 up to 128×128 dynamically, with up to 10 partition shapes per superblock — a square 4-way split, horizontal and vertical 2-way splits, four T-shaped patterns, and 4:1 / 1:4 elongated stripes. Smooth sky? One huge block. Fine architectural detail? A grid of small ones. The encoder spends bits where they matter and starves the regions that do not.
After reconstruction, AV1 runs two in-loop filters that JPEG and WebP simply do not have:
This is why AVIF often shows fewer ringing and blocking artifacts than JPEG even at very low bitrates. The encoder is not just compressing; it is post-processing its own output before the file is closed.
The price for all of this: the encoder has to choose, for every block, among 56 directions × multiple partition shapes × multiple transforms × multiple filter parameters. Even with heavy heuristics, a high-effort AVIF encode of a multi-megapixel photo can take seconds to minutes per image on a single CPU core — the same image as JPEG encodes in milliseconds. Decode is fast (modern devices handle it without complaint), but encode is fundamentally a search problem.
AVIF inherits one more thing from AV1: a real HDR-capable color pipeline. WebP is locked to 8-bit YUV 4:2:0; AVIF supports 8, 10, and 12 bits per component, plus 4:2:0, 4:2:2, 4:4:4, and monochrome chroma sampling.
The HDR signaling lives in the colr (Colour Information) property inside iprp, identifying:
What this means in practice: a Display P3 photograph from a recent iPhone can stay in a 10-bit BT.2020 PQ pipeline all the way to AVIF. A WebP cannot carry that information. A JPEG cannot carry that information. AVIF and JPEG XL can; HEIC also can. This is the single largest functional difference between AVIF and WebP.
Not every AVIF file is decodable by every AVIF decoder. The spec defines two profiles with hard pixel ceilings on each coded image item (AVIF v1.2.0 §A.4):
| Profile | Max pixels | Max width | Max height | Bit depth |
|---|---|---|---|---|
| Baseline | 8,912,896 | 8,192 | 4,352 | 8 / 10 |
| Advanced | 35,651,584 | 16,384 | 8,704 | 8 / 10 / 12 |
A Baseline-only decoder is allowed to refuse to decode a 10K×10K Advanced image. Any decoder advertising AVIF support must do at least Baseline.
Both profiles can exceed their nominal width/height by encoding the image as a grid derived image item — a dimg reference from the displayed item to N×M sub-tiles, each within the profile’s per-tile limit. This is how iPhone-style 48 MP captures land in AVIF without breaking conforming decoders: the file is internally a grid of smaller tiles, but presents as one large image at the API boundary.
Animated AVIF reuses the ISOBMFF movie box (moov) machinery, with the avis brand declared in ftyp. Each frame is still an AV1 keyframe — there are no inter-frame references in the still-image profile of AVIF — so animated AVIF is best understood as a sequence of independently-coded images timed by the container, not a real video.
This has two consequences:
Browser support for animated AVIF lags slightly behind static AVIF; test before relying on it for hero animations.
Some limitations are not bugs — they are downstream of the AV1 design.
The simplest path on Mac is Zipic: set Save Format to AVIF, drop in any supported source, and Zipic runs libavif in the background. For build pipelines, install libavif via Homebrew (brew install libavif) and script avifenc directly. The full Mac workflow comparison lives in Best AVIF Compression Tool for Mac.
Why is AVIF encoding so slow compared to WebP? Because the encoder has to search across 56 directional intra modes, multiple partition shapes from 4×4 to 128×128, multiple transforms, and CDEF/loop-restoration filter parameters per block. WebP’s VP8-derived encoder has a much smaller decision space. Pre-encode at build time and cache aggressively.
What is the relationship between AVIF and HEIC?
They share the same container (HEIF/ISOBMFF) and the same property model (ICC profiles, rotation, image grids, alpha auxiliary references). The difference is the codec inside mdat: HEIC carries HEVC-coded payloads, AVIF carries AV1-coded payloads. HEVC has patent royalties; AV1 is royalty-free, which is why AVIF made it onto the open web and HEIC mostly did not.
How do I store HDR content in AVIF?
Encode the source at 10-bit or 12-bit, set color primaries to BT.2020, and choose either PQ (for HDR10-style absolute-luminance content) or HLG (for broadcast-style scene-referred content) as the transfer function. The signaling lives in the colr property in iprp. A correctly-tagged AVIF will be tone-mapped or passed through by HDR-capable browsers and OS image viewers.
What is a “grid AVIF” and when do I need one?
A grid AVIF stores a single logical image as N×M sub-tiles tied together by a dimg reference. It is required whenever your image exceeds the per-tile pixel ceiling of your target profile (8.9 MP for Baseline, 35.6 MP for Advanced). Most encoders, including libavif, produce grid AVIFs automatically when needed.
Can AVIF carry a transparent alpha channel?
Yes, through an auxiliary image item linked with an auxl reference. The alpha plane is itself an AV1-coded payload, separate from the color plane, and is referenced by the primary item’s properties. This is how AVIF supports full 8-bit (or higher) alpha rather than the 1-bit transparency of GIF.
AVIF is the AV1 codec’s intra coding wrapped in HEIF, with profile-defined pixel ceilings, real 10/12-bit HDR signaling, and an in-loop filter stack that removes the artifacts JPEG cannot. The encoder is a search problem and that is the cost; the file-size and color-fidelity wins are the payoff. Download Zipic to convert any image to AVIF on Mac in batch, or upgrade to Zipic Pro to unlock all 12 formats and unlimited daily conversions. Every download includes a full 7-day Pro trial.

What is WebP? A 2026 deep dive into Google's image format — its VP8 origins, compression techniques, browser support (96.39%), file-size wins, limits, and when to use it.

AVIF vs WebP in 2026: browser support, compression ratios, encoding cost, transparency, and fallback strategy — with cited benchmarks and decision matrix.

Looking for a JPEG XL converter on Mac? Learn how to batch convert images to JXL with Zipic, when JPEG XL actually makes sense, and when to fall back to AVIF or WebP.