Optimize Images for Core Web Vitals: LCP & CLS Guide

·6 min read
Core Web VitalsLCPPerformance
Alex Chen· Image Performance Engineer

Optimizing images for Core Web Vitals targets the metrics Google measures: LCP, INP and CLS all improve when images are smaller, correctly sized and lazy-loaded. This guide connects each metric to a concrete image fix; for the terminology, browse the image optimization glossary.

Core Web Vitals and Images

Images directly affect two of three Core Web Vitals:

  • LCP (Largest Contentful Paint): The hero image is usually the LCP element
  • CLS (Cumulative Layout Shift): Images without dimensions cause layout shifts

Fixing LCP

  1. Optimize the hero image: Convert to WebP/AVIF, compress to quality 80
  2. Preload the LCP image: <link rel="preload" as="image" href="hero.webp">
  3. Use responsive images with srcset to serve appropriate sizes
  4. Target: LCP image under 100KB, loading in under 2.5 seconds

Fixing CLS

  1. Always set width and height attributes on <img> tags
  2. Use aspect-ratio CSS for responsive images
  3. Reserve space for images that load lazily

Impact on SEO

Google uses Core Web Vitals as ranking signals. A 1-second LCP improvement can increase organic traffic by 5-10%.

Related Guides

Ready to optimize your images?

Try BulkPicConv — Free