AVIF vs WebP: -50% bytes vs +decode cost
Newer format, smaller file. The tradeoff hides in decode time.
—
AVIF vs WebP at equal quality: ~30-50% smaller. A 120KB WebP hero -> ~65KB AVIF.
—
Decode cost: AVIF decodes ~2-3x slower on low-end CPUs. On a hero LCP image that can add 30-80ms of main-thread work.
—
Encode cost: AVIF encoding is ~10-20x slower, painful at build scale.
Serve AVIF via picture with WebP fallback; let weak devices skip the decode tax.
Takeaway: -50KB on the wire, but watch +50ms decode on p75 mobile.
Millisecond Mafia
@MillisecondMafia
AVIF vs WebP: -50% bytes vs +decode cost
Этот пост опубликован в Telegram-канале Millisecond Mafia. Подписаться можно по ссылке: @MillisecondMafia.