New researchTechnical SEO & AI Search · 2027Explore the framework

Image optimization for Core Web Vitals: improve LCP without causing CLS

A practical image workflow for LCP and CLS: right-size responsive images, prioritize the hero, lazy-load lower images and reserve layout space.

Part of the Core Web Vitals series. For the full picture, start with Core Web Vitals: what they are, how they affect SEO and how to improve them.

A page may ship a small, modern image and still feel slow because the browser does not discover it until JavaScript runs. Another may load quickly but push the headline down when a banner arrives. Image optimization for Core Web Vitals means solving both loading order and layout stability, not merely converting every file to WebP.

How does image optimization affect Core Web Vitals?

Images most directly affect Largest Contentful Paint (LCP) and Cumulative Layout Shift (CLS). The largest visible image is often the LCP element, but text can be the LCP element too. A missing image slot can move content when the image loads and increase CLS. The Core Web Vitals guide explains the metrics and thresholds; this article is the image-specific implementation workflow.

Symptom Likely cause First fix to test
Hero appears late Hidden behind CSS or JavaScript, or marked loading="lazy" Put its URL in initial HTML and load it eagerly
Hero download is long Desktop-sized file sent to mobile, inefficient compression Serve responsive sizes and compare quality at target dimensions
Product grid jumps Image dimensions not reserved Set width and height or a stable aspect-ratio container
Many thumbnails compete with hero Everything requests at once Lazy-load below-the-fold images; prioritize only the critical image

Before changing code, use PageSpeed Insights or DevTools to identify the real LCP element and the images responsible for shifts. A page’s LCP element can differ by viewport. The site-wide Core Web Vitals audit explains how to group affected URL templates.

How do you make the LCP image load sooner?

Put a normal <img src="..."> in the initial HTML when possible. web.dev’s LCP optimization guide warns that CSS backgrounds, JavaScript-inserted images and lazy-loading libraries can postpone resource discovery. Do not use loading="lazy" on the image visible at the top of the page. If a critical image must be referenced in CSS, consider an appropriate preload and check that it requests the same resource the browser later uses.

For one likely LCP image, fetchpriority="high" can tell the browser to start it earlier. web.dev’s Fetch Priority guide treats it as a hint, not a substitute for discovering the URL early. Avoid marking every gallery image high priority. A product page carousel usually needs the first visible slide first; the others can wait.

The detailed LCP guide covers the other delays, such as slow HTML and render-blocking work. Image changes will not repair a slow server response.

How do you send the right image size?

Use srcset and sizes so a mobile browser can choose an appropriately sized file, rather than downloading the desktop original. Google’s image SEO guide recommends retaining a src fallback even when using picture or srcset, which also helps discovery. web.dev’s responsive images guide explains how reducing resource load duration can improve LCP when the image is the LCP element.

Choose a format and compression setting that keeps the image useful. Compare the resulting bytes and visible quality at actual display sizes. A blurry product image can hurt the shopping experience even if its byte count is excellent. Reuse a stable image URL for the same asset where possible so caching helps repeat views.

<img
  src="shoe-960.webp"
  srcset="shoe-480.webp 480w, shoe-960.webp 960w, shoe-1440.webp 1440w"
  sizes="(max-width: 600px) 100vw, 960px"
  width="960"
  height="640"
  alt="Black trail shoe viewed from the side"
  fetchpriority="high"
>

This is an example for an initial-view hero, not a template to paste onto every image. Below-the-fold images generally should not get high priority.

How do you stop images causing CLS?

Reserve the space before the resource arrives. Set the image’s intrinsic width and height, then let CSS scale it responsively; or give the container an appropriate aspect-ratio. web.dev’s CLS optimization guide recommends this because the browser can calculate the box before the pixels download.

If a responsive <picture> swaps between crops with different ratios, provide dimensions that match each source or reserve an explicit slot for each layout. Product cards should keep a consistent image area even when some items use portrait photography and others use square pack shots. Check that placeholders and lazy-loaded images do not collapse to zero height.

How do you verify the image changes?

Test the same URL template on mobile and desktop. In DevTools, check when the LCP request begins, what file the browser selects from srcset, and whether any layout shifts remain. Re-run PageSpeed Insights after deployment and monitor field data as its rolling window updates. Keep image SEO and alt-text checks separate: descriptive alt text helps accessibility and discovery, but does not replace performance work.

Image Core Web Vitals checklist

  • Actual LCP element identified on each important template
  • Hero image visible in initial HTML and not lazy-loaded
  • One critical image prioritized when the trace supports it
  • Responsive dimensions and sensible compression used
  • All image slots reserve space before loading
  • Below-the-fold images lazy-loaded without hiding content from Google
  • Lab traces and real-user LCP and CLS rechecked

Optimize the image the user is waiting to see, then make every other image arrive without moving the page around.

Frequently asked questions

Which image should I optimize first for Core Web Vitals?

Start with the image that is actually the LCP element on an important page template, often a hero or large product image. Confirm it in PageSpeed Insights or DevTools instead of assuming the biggest file is the LCP element.

Does WebP automatically fix a slow LCP?

No. A smaller format can reduce transfer time, but a hero discovered late, lazy-loaded or blocked from rendering can still have poor LCP. Measure the delay before changing formats.

How do images cause CLS?

When the browser does not know an image's space before it loads, the content below can shift. Width and height attributes or a suitable CSS aspect ratio reserve that space.

Should every image use fetchpriority high?

No. Reserve high priority for the image that matters to the initial view, usually the LCP image. Giving every image high priority removes the distinction and can make resources compete.

· Founder, Crawlens

Dien builds Crawlens, a desktop crawler for technical SEO audits, and writes about the checks it runs: crawling, indexing, rendering and Search Console data.

Audit your own site with Crawlens

Crawl, run 70 checks, and see them next to Search Console and Core Web Vitals data.

Download free for Windows