Skip to content
Back to Blog
informational

What Is AVIF? The Modern Image Format You Should Know

2026-05-17 9 min read

What AVIF Actually Is

AVIF stands for AV1 Image File Format. It is a still-image container format derived from the AV1 video codec, which was developed by the Alliance for Open Media — a consortium that includes Google, Apple, Mozilla, Netflix, and Amazon, among others. The first stable specification landed in 2019, and browser support has grown steadily since then. The key thing to understand about AVIF is where it comes from. AV1 was built as a royalty-free alternative to HEVC (H.265), the codec behind Apple's HEIF format. Because AV1 is open and patent-unencumbered, any developer or company can implement it without paying licensing fees. That matters for adoption: it is why Firefox, Chrome, and Edge all support AVIF natively, while HEIF/HEIC support on the web remains patchy. AVIF stores images using intra-frame encoding from AV1 — essentially treating a single image as one frame of a video. This is not a shortcut; it gives AVIF access to the same sophisticated compression tools that make AV1 video so efficient: transform block sizes from 4×4 up to 64×64 pixels, film grain synthesis, loop filters, and more. The result is a format that competes directly with JPEG XL and WebP 2 for the title of most efficient general-purpose image format currently in wide use. AVIF supports 8-bit, 10-bit, and 12-bit color depth, HDR and wide color gamut (including Rec. 2020 and Display P3), alpha transparency, and even short animations. It handles both photographic content and graphics reasonably well, though as we will cover later, it is not perfect for every use case.

How AVIF Compression Compares to JPEG, WebP, and PNG

Numbers tell the story better than adjectives. A 2021 study by Netflix — one of the primary developers of the AV1 codec — showed that AVIF reduced file sizes by roughly 50% compared to JPEG at equivalent visual quality scores (measured by SSIM and VMAF). Google's own WebP format typically saves 25–34% over JPEG. So AVIF is not a marginal improvement; it is a meaningful generational step. To make this concrete: a high-quality product photograph saved as JPEG at quality 85 might weigh 180 KB. The same image exported as WebP at comparable quality often lands around 130 KB. As AVIF at a crf (constant rate factor) of 30, you might see 90–100 KB with no perceptible quality difference on a calibrated monitor. At crf 40 — still visually acceptable for most web thumbnails — you can push that below 60 KB. For graphics with flat colors and sharp edges (logos, illustrations, UI screenshots), PNG is the traditional lossless choice. AVIF supports lossless compression too, but its lossless mode is not always more efficient than PNG. In testing with typical UI screenshots, lossless AVIF files are sometimes 10–20% larger than equivalent PNGs. WebP lossless tends to beat PNG by around 26%, and it beats lossless AVIF in many synthetic tests. So AVIF's real strength is lossy compression of photographic content, not lossless graphics. Alpha transparency is where AVIF gains a clear edge over JPEG (which has none) and holds its own against WebP. A product image with a transparent background — the kind e-commerce sites use constantly — can be stored as AVIF with alpha at a fraction of the size of a PNG, often 60–70% smaller, while retaining clean edges around fine details like hair or fur.

Browser and Platform Support in 2025

AVIF is not experimental anymore. As of mid-2025, global browser support sits above 93% according to caniuse.com data. Chrome has supported AVIF since version 85 (August 2020). Firefox added support in version 93 (October 2021). Safari on macOS Ventura and iOS 16 onward supports AVIF decoding. Edge follows Chromium's timeline, so it has had AVIF support since late 2020. The practical implication: if you serve AVIF images on a modern website, the vast majority of your visitors will see them correctly. The remaining ~7% — primarily older Safari versions and some legacy Android WebViews — need a fallback. The standard approach is the HTML picture element: <picture> <source srcset="image.avif" type="image/avif"> <source srcset="image.webp" type="image/webp"> <img src="image.jpg" alt="Product photo"> </picture> This three-layer fallback covers essentially every browser in active use. Browsers that do not understand AVIF skip to WebP; those that do not understand WebP fall back to JPEG. No JavaScript required. On the desktop application side, support is more uneven. Windows 11 can display AVIF files in Photos if you install the AV1 Video Extension from the Microsoft Store (free). macOS Preview handles AVIF natively since macOS Monterey. Adobe Photoshop added AVIF support in version 23.2 (February 2022), accessible via File > Open or Save As — no plugin needed. GIMP has supported AVIF since version 2.10.22 via the libavif library. Figma can open AVIF files but does not export them natively as of this writing. For server-side image processing, libraries like libavif, Sharp (Node.js), Pillow (Python 3.10+), and ImageMagick 7.1+ all handle AVIF encoding and decoding.

When to Use AVIF — and When Not To

AVIF makes the most sense for photographic images served on the web where file size directly affects page load time and bandwidth costs. E-commerce product galleries, news article hero images, portfolio photography, and user-uploaded photos are all strong candidates. If your site serves thousands of images per day, switching to AVIF can reduce CDN egress costs by 30–50%, which is not trivial at scale. HDR photography is another compelling use case. AVIF's native support for 10-bit and 12-bit color depth and Rec. 2020 color space means it can represent HDR content without tone-mapping it down to SDR first. JPEG cannot do this at all. WebP is limited to 8-bit. If you are distributing high-end photography or real estate imagery to users with HDR displays, AVIF is currently the only widely-supported web format that can take full advantage of that hardware. However, AVIF is not the right choice in every situation. Encoding is computationally expensive. Encoding a single high-resolution image at high quality settings (crf 20 or lower) can take several seconds on a modern CPU, compared to milliseconds for JPEG. For applications that need real-time image encoding — a photo editing app that saves on every keystroke, for example — this latency is a problem. Hardware encoder support is improving (some GPUs now accelerate AV1), but software-only encoding remains slow. For vector graphics and diagrams, SVG is still the correct answer. For screenshots of code or text where pixel-perfect sharpness matters, PNG or lossless WebP may outperform AVIF. And for print workflows, AVIF is irrelevant — TIFF and PDF remain the standards there. If you need animated images, AVIF supports animation (AVIS sequences), but encoding animated AVIF is even slower than still images, and browser support for animated AVIF is less consistent. Animated WebP or simply using a short MP4/WebM video with autoplay is often more practical.

How to Convert Images to AVIF

There are several routes to AVIF conversion, each with different trade-offs. For command-line users, avifenc (part of the libavif toolkit) is the reference encoder. A typical invocation looks like: avifenc --min 20 --max 40 --speed 6 input.jpg output.avif. The --min and --max flags control quality (lower numbers = higher quality, 0–63 scale), and --speed trades encoding time for compression efficiency (0 is slowest and best, 10 is fastest). Speed 6 is a reasonable default for batch processing. Squoosh, Google's browser-based image compression tool (squoosh.app), lets you encode AVIF in the browser with a visual quality slider and side-by-side comparison. It is useful for one-off conversions and for understanding how different quality settings affect a specific image before committing to a batch workflow. For bulk conversions without a command line, CocoConvert handles AVIF output from common source formats including JPEG, PNG, WebP, and HEIC. You upload your file, select AVIF as the output format, and download the result. The encoder settings are handled automatically, targeting a balance between file size and visual quality that works for most web use cases. One honest caveat: CocoConvert does not currently expose manual crf controls or the ability to set chroma subsampling (4:4:4 vs 4:2:0), so if you need fine-grained control over those parameters — for example, preserving maximum color fidelity for professional photography — a command-line tool or Photoshop's export dialog will give you more precision. Photoshop users can go to File > Export > Export As, select AVIF from the format dropdown (available since CC 2022), and adjust the quality slider. Lightroom Classic does not export AVIF natively yet, though third-party plugins exist to fill that gap.

AVIF vs. JPEG XL: The Other Contender

Any honest discussion of AVIF has to acknowledge JPEG XL (JXL), which is competing for the same space. JPEG XL was standardized in 2022 and offers some capabilities AVIF lacks: lossless JPEG recompression (you can convert an existing JPEG to JXL and back without any quality loss, which AVIF cannot do), faster encoding at comparable quality, and better performance on images with sharp edges and text. In head-to-head compression tests, JPEG XL and AVIF trade wins depending on image content. AVIF tends to win on high-detail photographic content at very low bitrates. JPEG XL tends to win on graphics, text-heavy images, and situations where encoding speed matters. The critical difference right now is browser support. Chrome removed experimental JPEG XL support in 2023, citing insufficient ecosystem interest. As of mid-2025, only Safari (since Safari 17) and Firefox (behind a flag) support JXL natively. That means JPEG XL cannot be reliably served on the web without JavaScript-based polyfills or server-side transcoding. AVIF, with its 93%+ native browser support, is the practical choice for web deployment today. This may change. The JPEG XL community is active, and browser vendors could revisit support. But for anyone making decisions about image formats right now, AVIF has the deployment story that JPEG XL does not yet have.

Should You Migrate Your Existing Images to AVIF?

Migration is not an all-or-nothing decision. A reasonable strategy for most websites is to serve AVIF to browsers that support it while keeping existing JPEG and PNG files as fallbacks — exactly what the picture element pattern described earlier enables. This means you do not need to delete or replace your original files; you add AVIF versions alongside them. For a site with a large image library, batch conversion is the realistic approach. Tools like Sharp in a Node.js script, ImageMagick with a shell loop, or a build pipeline plugin (Vite has avif plugins, as does webpack via image-minimizer-webpack-plugin) can process hundreds or thousands of images overnight. The encoding time cost is paid once; the bandwidth savings accrue on every subsequent page load. For new images going forward, the decision is simpler: encode to AVIF by default for web delivery, keep the original high-resolution source file in whatever format it came from (RAW, TIFF, high-quality JPEG), and generate AVIF derivatives as part of your publishing workflow. Storage is worth considering. AVIF files are smaller than JPEGs, so a full migration will reduce storage requirements — but if you are keeping originals alongside AVIF versions, you are temporarily increasing storage until you can verify the conversions are acceptable and retire the originals. For most sites, the CDN bandwidth savings will outweigh any modest increase in origin storage costs. One area where caution is warranted: archival use. AVIF is a young format. JPEG has 30 years of ubiquitous support and will be readable by software that does not yet exist. For long-term archival of important images, TIFF or high-quality JPEG remains the more conservative choice. Use AVIF for delivery; keep your originals in a format with a longer track record.

What Is AVIF? The Modern Image Format You Should Know | CocoConvert Blog