Can AVIF Files Store Multiple Images?
AVIF files can encapsulate multiple images within a single file, including photo bursts, exposure brackets, and auxiliary image data. Because the AVIF specification is built on the ISO Base Media File Format (ISOBMFF) and inherits the structural design of the High Efficiency Image File Format (HEIF), it natively supports multi-image encapsulation. This capability allows creators and developers to bundle related captures, depth maps, and multiple exposures together rather than distributing them across separate files.
The Underlying Container: HEIF and ISOBMFF
The AV1 Image File Format (AVIF) uses the HEIF container format, which separates the storage architecture from the compression codec. While the AV1 codec handles image compression, the ISOBMFF-based container manages file structure and metadata.
HEIF defines two distinct methods for handling multiple frames:
- Image Collections (Items): The file contains several independent or related still images stored as distinct items.
- Image Sequences (Tracks): The file contains a sequence of images stored as a video-like track, commonly referred to as AVIFS when used for animations or continuous frame streams.
Photo Bursts
AVIF handles photo bursts through image collections or image sequences. In an image collection, each frame in the burst is stored as an individual image item. One frame is designated as the primary item—the photo that displays by default in standard viewers—while the remaining shots are linked to the primary image.
This approach preserves the full resolution and individual metadata of every shot in the burst while keeping them contained within a single file.
Exposure Bracketing and HDR
Exposure bracketing involves taking multiple consecutive shots of the same scene at varying exposure values (underexposed, standard, and overexposed) to capture a wide dynamic range.
AVIF is well suited for exposure brackets for two main reasons:
- Item Association: Each bracketed exposure can be encapsulated as a separate item, allowing post-processing software to extract individual raw or compressed frames from one container.
- Auxiliary Items and Gain Maps: AVIF supports auxiliary image items, which are non-display images used to complement a primary image. This allows a standard SDR (Standard Dynamic Range) image to be packaged alongside an HDR gain map or exposure layer, enabling devices to render high-contrast scenes dynamically based on display capabilities.
Auxiliary Data: Depth Maps and Alpha Channels
Beyond bursts and exposure series, AVIF can encapsulate secondary image data associated with a primary shot:
- Alpha Channels: Used to store transparency masks independently from color data.
- Depth Maps: Used in computational photography to store 3D depth information for portrait mode effects, refocusing, or stereo imaging.
Software Support and Implementation Considerations
Although the AVIF specification fully supports multi-image encapsulation, real-world software implementation depends on the decoder:
- Web Browsers: Modern browsers fully support single-image AVIF and animated AVIF sequences (AVIFS). However, specialized features like selective extraction of burst frames or bracketed item collections require specialized application-level support.
- Photo Viewers and Editors: Advanced imaging software that supports HEIF containers can often parse the individual items inside an AVIF file, but widespread adoption for burst and bracketed AVIF files is still developing compared to traditional RAW or JPEG stacks.