STUDIO April 7, 2024
Improve PageSpeed with Next-Generation Image Formats
Use WebP and AVIF, responsive delivery and reliable fallbacks to reduce image weight without sacrificing visual quality.
Images often account for most of a page’s transferred bytes. Modern formats can deliver comparable visual quality at a smaller size, improving loading speed and helping the page meet its performance targets.
Choose the format for the asset
WebP is widely supported and works well for photographs and transparent graphics. AVIF can provide even stronger compression for suitable images, though encoding cost and workflow support should be considered. SVG remains ideal for many vector illustrations and icons.
Generate sensible variants
Do not serve a desktop-sized image to a narrow mobile viewport. Produce multiple dimensions and use srcset and sizes so the browser can select an appropriate resource. Keep the source asset and automate derivatives when possible.
Provide a fallback where needed
The picture element can offer AVIF and WebP sources followed by JPEG or PNG. Confirm that caching varies correctly and that the content management pipeline does not silently return the wrong MIME type.
Load images intentionally
Prioritise the main visual that affects Largest Contentful Paint and lazy-load images that begin below the fold. Always include dimensions to prevent layout shift. A CDN can resize and negotiate formats at the edge when configured carefully.
Measure the result
Compare transferred bytes, decode time, LCP and visual quality on real devices. PageSpeed Insights is a useful signal, but the goal is a faster experience—not a score achieved by degrading the image beyond its purpose.
