AVIF
A newer image format that often compresses even smaller than WebP, at the cost of slower encoding.
In more detail
Browsers advertise AVIF support in their Accept header. Encoding is slower than for WebP, so servers usually generate and cache it once.
Example
next/image serves AVIF only when you add image/avif to images.formats in next.config.Related terms
- WebP — A modern image format from Google that is usually much smaller than older photo formats or PNG at the same quality.
- next/image — The Next.js Image component, which resizes, converts and lazy-loads images and reserves their space to prevent layout shift.
- Accept header — The request header in which a client lists the formats it can read, such as Accept: application/json.
Taught in
- Image & Font Optimization: Zero Layout Shift Assets — Next.js 15 & Modern App Router Architecture