performanceWeb Platform
Responsive Images
MUST
MUST: Use `srcset` + `sizes` for responsive images. Serve WebP/AVIF with `<picture>` fallback. Always set explicit `width`/`height` attributes or CSS `aspect-ratio` to prevent CLS.
Serve optimally-sized images for each device with srcset, sizes, and modern formats
Bad
Good
Why it matters
Without responsive images, mobile users download desktop-sized images, wasting bandwidth and slowing LCP. srcset lets browsers choose optimal sizes. Modern formats (WebP, AVIF) reduce file size 25-50%.
References