What is AVIF?
AVIF is an open, royalty-free image format that stores images or image sequences using AV1 compression. It supports lossy and lossless encoding, transparency, animation, and high dynamic range.
How AVIF works
AVIF stores a subset of the AV1 bitstream in a HEIF file, so the picture is described by ISO Base Media boxes instead of being a bare AV1 stream. A still image is an item with properties for codec configuration, dimensions, and pixel format; an animation is an image-sequence track; and transparency is a separate monochrome auxiliary image. AV1 codes 8-, 10-, and 12-bit samples, and the format covers standard dynamic range, HDR, and wide color gamut. Files use the .avif extension and the image/avif media type. The current specification is version 1.2.0, published by the Alliance for Open Media in October 2025. MDN describes the format as royalty-free and points to the Alliance’s licensing terms.
Key facts
- To recognize AVIF, read the brands, not the extension. The file begins with a file-type box that must list
miaftogether withavif(still image items) oravis(image sequences). The image is then an item described by properties such asav1C,ispe, andpixi, so a parser needs HEIF item and property support, not only an AV1 decoder. - Large images meet profile limits before format limits. AV1 can code a frame up to 65536x65536, but the AVIF Baseline profile (brand
MA1B) limits a single coded image to 8192 pixels wide, 4352 high, and 8,912,896 pixels in total. The Advanced profile (MA1A) allows a still image item up to 16384 wide, 8704 high, and 35,651,584 pixels; its image sequences stay at AV1 level5.1, the level behind the Baseline figures. A larger still picture stays inside a profile by being stored as a grid of smaller coded images. A file whose coded image exceeds the profile limits signals only the general AVIF brands, and the specification notes that some decoders may not handle larger images. Decoders add their own caps: libavif 1.3.0 defaults to 32768 pixels per side and 16384x16384 pixels in total. - A lossless flag alone does not make the output pixel-exact, because two steps before coding can change pixels. Chroma subsampling reduces color resolution: when sharp users reported that lossless AVIF output was not accurate, the maintainer pointed to chroma subsampling, and sharp’s AVIF options document
4:4:4as the default with4:2:0as an opt-in. Full-resolution4:4:4chroma is not enough by itself either: a libavif contributor explains that converting RGB to YUV at the same bit depth introduces a small loss, so libavif reaches true lossless by storing the RGB values directly. Compare decoded color and alpha values with the source instead of relying on settings. Lossless AV1 is also weak on flat graphics; libavif contributors describe it as efficient for photo-like images and expect it to do much worse than lossless WebP on graphical content. - Decoding a plain 8-bit still proves little about the rest of the format. caniuse records that Safari’s first AVIF releases (versions 16.1 to 16.3 on macOS, versions 16.0 to 16.3 on iOS) decoded stills but not image sequences or images with noise synthesis, and that Firefox played sequences by default only from version 113. Server-side tools vary too: sharp’s documentation says AVIF image sequences are not supported, and its issue tracker has a report of bad colors when reading HDR AVIF (open in October 2026) and one of reduced gamut with high-bit-depth AVIF (closed in April 2025). Test alpha, 10- and 12-bit, HDR, and animation separately on each decoder and tool you depend on.
When AVIF matters
Generate AVIF variants when smaller transfers or features such as alpha, 10- or 12-bit depth, and HDR justify the extra encoding work, and keep a fallback. MDN still recommends serving AVIF through a <picture> element with a WebP, JPEG, or PNG alternative, and caniuse shows why: Chrome has decoded AVIF since version 85 and Firefox since 93, but full Safari support dates from version 16.4 and Edge support only from 121.
How Transloadit helps with AVIF
Transloadit’s image formats table lists AVIF as a format that its ImageMagick-based Robots, including /image/resize, can read and write, and the Robot’s format parameter accepts any format the table marks as writable.
The /image/resize documentation describes its quality parameter for JPG and PNG and does not document AVIF-specific controls such as lossless mode, chroma subsampling, or bit depth. It does state that the background of transparent images is changed to white by default and that background must be set to none to preserve transparency. Check size, color, and transparency of AVIF output on your own images before depending on it.
Explore Transloadit’s file formats & compression capabilities
Sources
- AV1 Image File Format (AVIF) v1.2.0: scope, brands (6), general constraints (7), profiles (8), box requirements (9)
- Alliance for Open Media: AVIF overview and specification versions
- Alliance for Open Media Patent License, version 1.0
- MDN: Image file type and format guide (AVIF section, fallback advice)
- Can I use: AVIF image format (browser versions and partial-support notes)
- libavif 1.3.0 avif.h, lines 93–101: default image size, dimension, and frame-count limits
- sharp output options: avif (lossless, chromaSubsampling, bitdepth; sequences not supported)
- sharp issue #2696: AVIF lossless is not accurate
- sharp issue #4264: Reading HDR AVIF results in very bad colors
- sharp issue #4344: Reduction of gamut when handling high bitdepth AVIF
- libavif issue #1244: contributor comments on lossless AVIF, RGB-to-YUV conversion, and graphical content