AVIF: The Next-Gen Format That's Already Here
JPEG has been the default web image format for decades thanks to universal compatibility, but its compression model is dated and often produces bulky files or visible artifacts. WebP improved the tradeoff, and AVIF pushes further by borrowing from the AV1 video codec to deliver similar quality at noticeably lower bitrates.
A typical 12-megapixel smartphone photo illustrates the impact: a standard JPEG might occupy around 4.9 MB and a WebP around 2.1 MB, while AVIF can produce a visually comparable file at roughly 1.2 MB. Actual numbers vary significantly with the image, but the general 40-60% reduction against JPEG is consistent across most benchmarks.
A Corporate Codec - Origin of AVIF
The origin of AVIF is a story of industry-wide frustration. For years, the dominant video format was H.265, which was controlled by a complex group of patent holders. This created a legal and financial burden for streaming companies and browser developers, who faced high licensing fees and royalty disputes.
In 2015, a rare alliance formed to solve this problem. Major rivals including Apple, Google, Meta, Microsoft, and Netflix created the Alliance for Open Media. Their goal was to develop a next-generation video codec that was completely royalty-free and open to everyone.
The result of this collaboration was AV1, finalized in 2018. Following the same logic used to create WebP, developers adapted this powerful video technology for still images. This became AVIF. It uses the same advanced compression engine that powers high-definition streaming, but applies it to a single, highly efficient frame.
Why Royalty-Free and Cross-Vendor Backing Matter
The cooperation of major tech rivals within the Alliance for Open Media matters primarily because it ensures the format is royalty-free.
Unlike Apple's HEIF format, which is tied to the patented HEVC codec, AVIF carries no licensing fees. This lack of financial and legal baggage is the primary reason AVIF has seen such rapid adoption. Historically, formats burdened by licensing requirements, such as JPEG 2000, have failed to gain traction because the web relies on open standards. By removing these barriers, any developer or company can implement AVIF support without cost.
Furthermore, the involvement of Apple, Google, and Mozilla from the beginning secured institutional support across all three major browser engines: Blink, WebKit, and Gecko. This stands in stark contrast to the rollout of WebP, where Google spent years waiting for Apple to adopt the standard in Safari. Because Apple helped build the foundation for AVIF, the path to universal support was established from day one.
AVIF By The Numbers
Concrete benchmarks demonstrate that AVIF consistently outperforms its predecessors. In tests using matched visual quality, WebP typically reduces JPEG file sizes by 35%. AVIF goes significantly further, cutting those same files by more than 50%.
On a page containing 30 images, transitioning from WebP to AVIF can reduce the total image payload by an additional 30%. While the advantages are most dramatic in high-resolution photos with fine textures, AVIF meets or beats WebP in almost every category, including simple graphics with flat colors.
The technical edge lies in the AV1 prediction engine. Unlike JPEG, which is limited to 8x8 pixel blocks, or WebP, which tops out at 16x16, AVIF can utilize block sizes ranging from 4x4 up to 128x128. This flexibility allows the format to use large blocks for simple areas like the sky while preserving intricate details like eyelashes with smaller blocks, ensuring data is used only where it is needed most.
HDR and Wide Color Gamut Support
AVIF natively supports 10-bit and 12-bit color depth, as well as HDR and wide color gamuts like Display P3 and BT.2020. While these technical specifications are often overlooked, they are essential for modern hardware. Most contemporary smartphones, MacBooks, and high-end monitors are designed to display these richer colors, but older formats remain restricted.
Traditional JPEGs and WebP files are generally limited to 8-bit color depth and the sRGB color space. When a high-quality photo captured on a modern device is converted to these formats, it is forced into a narrower color range, resulting in the loss of vibrant detail. AVIF is the first web-compatible format capable of preserving the full range of what the camera originally captured.
As platforms like Google Photos and devices like the iPhone 16 Pro move toward an HDR-standard future, the web must adapt. AVIF is currently the only widely supported format equipped to handle this shift properly, ensuring that images look as vivid on a website as they do in a professional photo gallery.
The Speed Problem
The main drawback of AVIF is that it's painfully slow. Encoding a typical smartphone photo as JPEG takes about 0.2 seconds on a modern machine, while WebP takes roughly 1.5 seconds. AVIF, by comparison, takes around 12 seconds at default settings. If you bump the image up to maximum quality, you're looking at 30 seconds or more for a single image.
For a Content Delivery Network that processes millions of images, this can become a real problem, not just in time spent but also in the CPU cost. AVIF encoding is expensive in a way that directly translates to server bills based on its CPU usage.
The encoding asymmetry is by design. AV1 was built for video streaming where you encode once on powerful servers and decode billions of times cheaply on user devices. That tradeoff makes sense for a service like Netflix but is less ideal for a website that needs to convert its image library on the fly.
Decoding AVIF is fast, which is what actually matters for the end user. Browsers render AVIF images quickly, so the party responsible for the encoding cost is the developer, not the visitor. Still, slow encoding is the number one reason some image optimization services haven't fully embraced AVIF yet.
The good news is that encoding speed has improved dramatically since the early days. Libraries like libavif and cavif have grown much faster, and new tech related to hardware-accelerated encoding has surfaced as a possible long-term solution.
Browser Support
AVIF support is now more robust than many developers realize, covering approximately 95% of global web traffic. Chrome and Edge have supported the format since 2020, with Firefox following in 2021 and Safari joining in early 2023. While this doesn't yet match the near-universal 99% reach of WebP, it has long passed the threshold where serving AVIF as a primary option is both safe and effective for the vast majority of users.
Desktop Tooling
Professional support for AVIF is widespread in major editing software, even if it remains inconsistent across smaller utilities. Industry standards like Adobe Photoshop, GIMP, and Affinity Photo have fully integrated the format since early 2022. While these primary editors handle the files reliably, the broader ecosystem is currently in a transitional phase similar to the status of WebP in 2020. You may still encounter niche tools or web services that do not yet recognize the format, though compatibility continues to improve.
On the operating system level, native viewing is now standard across most platforms. Windows 11 supports AVIF, though users may occasionally need to install the AV1 Video Extensions from the Microsoft Store for full functionality. Apple integrated support starting with macOS Ventura, and the majority of modern Linux image viewers handle the format without issue. While the experience is functional, it is not yet entirely seamless, making it important to verify compatibility when working with specific third-party pipelines.
Is AVIF Ready to Replace WebP?
For existing websites already using WebP, the decision to switch depends on your workflow. If your image pipeline or Content Delivery Network handles conversions automatically, enabling AVIF provides an immediate performance boost. However, if the change requires manual re-encoding of an entire library, the improvement is meaningful but perhaps not urgent enough to justify immediate action.
While the slower encoding speed of AVIF remains a factor at scale, the technology improves every year. The indisputable compression advantage and the ability to support HDR content make the format increasingly relevant as display technology advances. AVIF is no longer a niche option; it is backed by major tech firms and produces files roughly half the size of a standard JPEG without compromising visual quality.
Whether AVIF fully displaces WebP or simply coexists with it for the next several years remains to be seen. WebP's mature tooling still offers advantages for certain workflows, and it's plausible that AVIF becomes the standard for photo-heavy sites while WebP keeps its role for general use.