Glossary

AVIF vs WebP: which image format should you choose?

Definition
AVIF usually compresses better than WebP, for smaller files at equal quality; but WebP is still supported by more browsers. The best answer: serve both according to the browser.
WebP, introduced by Google, already greatly reduces size compared to JPEG and PNG. AVIF, more recent, often goes further in compression, especially for photos, at the cost of somewhat more expensive encoding. Rather than choosing, the optimal strategy is to let each browser receive the lightest format it supports.

Key points

AVIF

Better compression on most photos, for smaller files with equal perceived quality. Rapidly growing support.

WebP

Excellent weight/quality compromise and very wide support, including older browsers.

The answer—format=auto

With cloudphoto, format=auto serves AVIF if the browser supports it, WebP otherwise—you have nothing to arbitrate.

From theory to practice

cloudphoto applies all of this on the fly, from a simple URL. 15-day free trial, no credit card.