How to Compress AVIF Images: Complete Guide (2026)

Updated June 2026 · 6 min read

The challenge: AVIF already compresses brilliantly — files are tiny out of the box. But you can squeeze another 30-50% out with the right settings, especially for web use.

AVIF Compression Basics

AVIF uses the AV1 video codec for still images. This gives it a natural compression advantage over older formats. A typical photo that's 1.2MB as JPEG might be 250KB as WebP and just 160KB as AVIF — all at visually identical quality.

But AVIF has a unique characteristic: its compression curve is steep. At quality 30-40, it still looks remarkably good. At quality 100, files can actually be larger than WebP. The sweet spot is usually 40-60.

Compression Settings Comparison

FormatQuality 30Quality 50Quality 80Quality 100
JPEG45 KB120 KB380 KB800 KB
WebP28 KB72 KB210 KB520 KB
AVIF18 KB40 KB95 KB280 KB

Test image: 2048×1536 photo, colors varied. Values approximate.

Browser Tools for AVIF Compression

The easiest way to compress an AVIF: convert it to a more controllable format, adjust compression, then convert back. Our Compress2PNG tool handles this workflow:

  1. Upload your AVIF, convert to PNG at high quality
  2. Adjust the quality slider to compress
  3. Export as AVIF, WebP, or JPG as needed

This gives you visual control over the output — you can preview exactly how the compressed version looks before downloading.

Command Line: avifenc

# Install (macOS)
brew install libavif

# Best quality (slow)
avifenc -s 0 -q 60 input.jpg output.avif

# Fast compression
avifenc -s 8 -q 50 input.jpg output.avif

# Lossless
avifenc -s 0 -l input.png output.avif

The -s flag controls encoding speed (0 = slowest/best, 10 = fastest/worst). For production, use 0-2 for the best compression.

When NOT to Compress AVIF Further

If your AVIF is already under 100KB for a full-size photo, further compression usually isn't worth it. The file is already tiny. Focus your optimization efforts on other assets — JavaScript, CSS, and above-the-fold content typically have a bigger impact on page speed.