WebP vs AVIF: which modern image format wins?
Short answer
AVIF generally produces smaller files at the same quality and supports HDR and wide color, but encodes more slowly. WebP is faster, lighter to produce, and very widely supported. Both are excellent upgrades over JPG and PNG for the web.
Where they come from
WebP was created by Google and is built on the VP8/VP9 video codecs. AVIF is newer and is based on the AV1 video codec from the Alliance for Open Media. Both support lossy and lossless modes, transparency, and animation.
Compression and quality
AVIF typically reaches smaller files than WebP at the same perceived quality, and it holds up especially well at low bitrates where WebP can look blocky. AVIF also supports higher bit depth, HDR, and wide color gamut, which matters for high-end photography.
Encoding speed and support
- WebP encodes quickly and is supported in every current major browser.
- AVIF encodes more slowly, especially at high effort settings, but is now supported across current Chrome, Firefox, and Safari.
- For broad compatibility with older clients, keep a JPG or PNG fallback.