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.
| Format | Quality 30 | Quality 50 | Quality 80 | Quality 100 |
|---|---|---|---|---|
| JPEG | 45 KB | 120 KB | 380 KB | 800 KB |
| WebP | 28 KB | 72 KB | 210 KB | 520 KB |
| AVIF | 18 KB | 40 KB | 95 KB | 280 KB |
Test image: 2048×1536 photo, colors varied. Values approximate.
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:
This gives you visual control over the output — you can preview exactly how the compressed version looks before downloading.
# 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.
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.