Skip to content
AnyResizerBlog

AVIF vs WebP: File Size and Browser Support Tested

·
·
4 min read
Comparison graphic showing AVIF and WebP file size benchmarks

Both AVIF and WebP are modern image formats created to replace aging JPG and PNG files on the web. While WebP arrived first and gained universal browser adoption, AVIF offers newer compression technology derived from the AV1 video codec.

Here is how the two formats compare in compression tests, browser support, and real-world website performance.

How AVIF and WebP Differ

WebP was created by Google using compression techniques from the VP8 video standard. AVIF was created by the Alliance for Open Media (AOMedia) using the open-source AV1 video standard.

Both formats deliver modern capabilities:

  • Lossy compression for photographic content
  • Lossless compression for graphics and screenshots
  • 8-bit alpha transparency channels
  • Animation support (replacing heavy animated GIFs)

AVIF takes compression a step further by supporting 10-bit and 12-bit HDR color depth, whereas WebP is limited to standard 8-bit color. If you are comparing both against traditional formats, check our JPG vs PNG vs WebP benchmark.

Compression Benchmark: 5 Photos Tested

We compressed five high-resolution test photos (1920×1080 pixels) to both formats at matched perceptual quality (SSIM index ~0.96):

Image SubjectOriginal JPGWebP OutputAVIF OutputAVIF Savings vs WebP
Mountain Landscape1,420 KB284 KB231 KB18.6% smaller
Portrait with Bokeh890 KB178 KB142 KB20.2% smaller
Urban Architecture1,650 KB340 KB288 KB15.3% smaller
Macro Flower Detail1,120 KB225 KB185 KB17.7% smaller
Low-Light Night Scene1,350 KB290 KB238 KB17.9% smaller

Across all five photographic subjects, AVIF saved an average of 18% more storage space than WebP without noticeable loss of detail.

Encoding Speed and CPU Overhead

The primary trade-off with AVIF is processing speed. Encoding an image to AVIF requires between 4× and 8× more CPU time than encoding the same image to WebP.

This matters when:

  • Your web server generates images on demand
  • You upload large batches of photos from a mobile device
  • You run automated build pipelines on cloud platforms with compute limits

For real-time generation, WebP remains the practical choice. For static assets where you compress once and serve millions of times, AVIF delivers measurable bandwidth savings.

Browser Support Status

Every major desktop and mobile browser now supports both formats:

  • WebP: 97% global browser support (all modern browsers + legacy Safari 14+)
  • AVIF: 93% global browser support (Chrome 85+, Firefox 93+, Safari 16.4+, Edge 121+)

For older browsers that lack native AVIF decoders, websites use the HTML <picture> element to offer AVIF with a WebP fallback.

When to Use Each Format

Choose AVIF when:

  • You want the smallest possible file sizes for mobile users
  • You display HDR photography with wide color gamuts
  • Bandwidth costs are your primary infrastructure priority

Choose WebP when:

  • You need rapid image generation without server bottlenecks
  • You need files to open without extra codecs in older desktop graphics editors
  • You want a single lightweight web format without managing fallback tags

If you run into programs or desktop tools that refuse to display your exported WebP files, see our guide on why won't my WebP image open.

If you have downloaded AVIF files that your computer cannot open, you can convert them back to standard JPG format right in your browser.

Frequently asked questions

Yes. In our tests on photographic content, AVIF files were consistently 15% to 20% smaller than WebP at matched visual quality levels.
AnyResizer Editorial Team

AnyResizer Editorial Team

·Image Processing & Web Performance Specialists

The AnyResizer editorial team benchmarks image codecs, compression ratios, and web graphic formats using in-browser WASM and Canvas engines.

About the author

Related guides