All articles

title: "How to Optimize Images for Core Web Vitals (LCP, CLS, INP)" description: "Improve Core Web Vitals scores by optimizing images. Reduce LCP with compression and preloading, fix CLS with dimensions, and improve INP with lazy loading." date: "2026-05-14" keywords: ["Core Web Vitals images", "LCP optimization", "CLS images", "image optimization performance", "page speed images", "INP optimization"] relatedTools: ["compress", "resize", "progressive-jpeg", "convert", "lossless-optimize"]

How to Optimize Images for Core Web Vitals

Google uses Core Web Vitals as a ranking signal. Images are the biggest contributor to poor scores — they affect LCP, CLS, and INP. Here is exactly how to optimize images for each metric.

The Three Metrics That Matter

| Metric | Target | What It Measures | Image Impact | |--------|--------|-----------------|--------------| | LCP | < 2.5s | Largest visible element load time | Hero images are often the LCP element | | CLS | < 0.1 | Visual stability (layout shifts) | Images without dimensions cause shifts | | INP | < 200ms | Responsiveness to interaction | Large image decoding blocks main thread |

Optimizing for LCP (Largest Contentful Paint)

The LCP element is frequently a hero image. Here is how to make it load fast:

1. Compress Aggressively

Your hero image should be under 200KB. Use lossy compression at quality 80-85%:

  • Use theimgapp's Compress tool with quality slider
  • Target 100-200KB for hero images
  • Target 50-100KB for content images

2. Use Modern Formats

WebP is 30% smaller than JPEG. AVIF is 50% smaller. Serve the smallest format the browser supports:

<picture>
  <source srcset="hero.avif" type="image/avif">
  <source srcset="hero.webp" type="image/webp">
  <img src="hero.jpg" alt="Description" width="1200" height="600" fetchpriority="high">
</picture>

Convert with theimgapp's Format Converter.

3. Preload the LCP Image

Tell the browser to start downloading the hero image immediately:

<link rel="preload" as="image" href="hero.webp" type="image/webp">

4. Use fetchpriority="high"

Signal that this image is critical:

<img src="hero.webp" fetchpriority="high" loading="eager" decoding="sync">

5. Resize to Display Dimensions

Never serve a 4000px image in a 1200px container. Resize to actual display size:

Use theimgapp's Resize tool to match your layout width.

6. Use Progressive JPEG

Progressive JPEGs show a blurry preview immediately, then sharpen. This improves perceived LCP even if the full load takes the same time.

Convert with theimgapp's Progressive JPEG tool.

Optimizing for CLS (Cumulative Layout Shift)

Images cause layout shift when they load without reserved space. The browser does not know how tall the image will be until it downloads.

1. Always Set Width and Height

<img src="photo.webp" alt="Description" width="800" height="600">

This lets the browser reserve the correct space before the image loads.

2. Use CSS aspect-ratio for Responsive Images

img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}

3. Never Insert Images Above Existing Content

Dynamically injecting images above content that the user is already reading causes layout shifts. Always add new content below the viewport.

4. Use Placeholder Backgrounds

Show a background color or blur-up placeholder while the image loads:

.image-container {
  background-color: #f0f0f0;
  aspect-ratio: 16 / 9;
}

Optimizing for INP (Interaction to Next Paint)

Large images can block the main thread during decode, making the page feel unresponsive.

1. Lazy Load Below-the-Fold Images

<img src="below-fold.webp" loading="lazy" decoding="async" width="800" height="600">

loading="lazy" defers download. decoding="async" prevents main thread blocking during decode.

2. Avoid Extremely Large Dimensions

A 6000×4000 image decoded in the browser consumes significant CPU time. Resize to actual display dimensions.

3. Use content-visibility for Off-Screen Sections

.far-below-fold {
  content-visibility: auto;
  contain-intrinsic-size: 0 500px;
}

This tells the browser to skip rendering until the section is near the viewport.

Quick Checklist

For Every Image

  • [ ] Set explicit width and height attributes
  • [ ] Use loading="lazy" for below-the-fold images
  • [ ] Use decoding="async" for non-critical images
  • [ ] Compress to under 100KB (content images)
  • [ ] Use WebP or AVIF format

For the Hero/LCP Image

  • [ ] Preload with <link rel="preload">
  • [ ] Use fetchpriority="high"
  • [ ] Use loading="eager" (NOT lazy)
  • [ ] Compress to under 200KB
  • [ ] Use Progressive JPEG or WebP
  • [ ] Serve at exact display dimensions

For All Images

  • [ ] Resize to display dimensions (not larger)
  • [ ] Strip EXIF metadata
  • [ ] Use responsive srcset for multiple viewport sizes

Measuring Your Scores

  • PageSpeed Insights — Google's official tool (pagespeed.web.dev)
  • Chrome DevTools — Performance tab for real-world testing
  • Search Console — Core Web Vitals report for real user data

Tools Summary

All free, browser-based, no signup: