How Images Affect Core Web Vitals

Largest Contentful Paint (LCP)

LCP measures how quickly the largest visible content element loads. For most websites, the largest element is a hero image, product photo, or banner. Uncompressed or oversized images are the single most common cause of poor LCP scores. Target: LCP under 2.5 seconds for a "Good" score.

Cumulative Layout Shift (CLS)

CLS measures unexpected layout shifts as the page loads. Images without explicit width and height attributes cause CLS because the browser cannot reserve space before the image loads. Always specify width and height on img elements to prevent layout shifts.

Interaction to Next Paint (INP)

INP replaced FID in 2024. While images don't directly affect INP, large unoptimized images slow the initial page load and increase time-to-interactive, which impacts perceived responsiveness.

Image Optimization Checklist

1. Use Modern Formats (WebP, AVIF)

Google's PageSpeed Insights specifically recommends "Serve images in next-gen formats." Converting JPEG images to WebP reduces file sizes by 25-35%, directly improving LCP. Use the HTML picture element to serve AVIF to compatible browsers, WebP to most others, and JPEG as the universal fallback.

2. Compress Images Before Uploading

Use imgavio to compress images before uploading. Target: hero images under 200KB, product images under 100KB, blog thumbnails under 50KB. These targets, combined with browser caching, ensure images load within the LCP budget.

3. Resize Images to Display Dimensions

Never serve images larger than their display size. A 4000x3000px image displayed at 800px wide wastes 25x the bandwidth and processing. Resize to exact display dimensions. For responsive designs, provide multiple sizes using the srcset attribute.

4. Add Width and Height Attributes (Prevents CLS)

Always include width and height attributes on img elements. This allows the browser to reserve the correct space before the image loads, preventing layout shifts that hurt CLS scores. If using CSS to make images responsive, also add aspect-ratio to your stylesheet.

5. Lazy Load Below-the-Fold Images

Add loading="lazy" to images that appear below the fold. This defers loading until the user scrolls toward them, improving initial page load time and LCP for the above-the-fold content.

6. Preload the LCP Image

For your hero image (the likely LCP element), add a preload link in the document head with rel="preload" and as="image". This signals to the browser to fetch this resource with highest priority, often improving LCP by 200-500ms.

Measuring Your Improvements

Use Google PageSpeed Insights before and after optimization. The Opportunities section lists specific image issues with estimated savings. A fully optimized image setup can improve LCP by 1-3 seconds on typical websites — significant for both user experience and search ranking performance.

Try imgavio Free Image Tools

All tools process images locally in your browser — your files never leave your device.

Explore All Tools