How images affect Core Web Vitals
Images are the largest element on most pages, so they usually decide two of the three Core Web Vitals. Here is what to measure and what to change.
The short answer
For images, three actions matter most: make the main image light (right size, modern format, sensible quality), declare its dimensions in the HTML so the layout does not shift, and do not lazy-load it. Those steps address Largest Contentful Paint (LCP) and Cumulative Layout Shift (CLS) directly.
What Core Web Vitals measure
Core Web Vitals are three measurements Google uses to describe how a page feels to a visitor, based on real user data. The thresholds below are the ones Google publishes as "good", measured at the 75th percentile of visits:
| Metric | What it measures | "Good" threshold | Role of images |
|---|---|---|---|
| LCP, Largest Contentful Paint | When the largest visible element has loaded | 2.5 seconds or less | Often an image: very high |
| INP, Interaction to Next Paint | How quickly the page responds to taps and clicks | 200 ms or less | Indirect (heavy decoding competes for the main thread) |
| CLS, Cumulative Layout Shift | How much the layout moves unexpectedly | 0.1 or less | Images without dimensions: high |
Core Web Vitals are one signal among many; a fast page does not guarantee rankings, but a slow one hurts the visitor first.
Improving LCP with images
On many pages the LCP element is the hero image or the first large photo. To bring it under 2.5 seconds:
- Reduce the weight. Resize to the real display size with Resize image, then compress with Compress image. Going from a 1.8 MB original to 150 KB can save a second or more on a mobile connection.
- Use a modern format. WebP or AVIF typically cut a third to a half off a JPG of similar quality.
- Do not lazy-load the main image. Remove
loading="lazy"from it. You can addfetchpriority="high"so the browser fetches it early. - Do not hide it behind CSS or JavaScript. A background image set in a stylesheet is discovered later than an
imgtag in the HTML. Prefer theimgelement for important images. - Serve the right size per device with
srcset(see mobile optimization).
Improving CLS with images
A layout shift happens when an image loads and pushes the text down. The fix is simple: give the browser the dimensions before the image arrives.
<img src="photo.webp" width="1200" height="800" alt="Description">
With width and height set, browsers compute the aspect ratio and reserve the space. In CSS, max-width: 100%; height: auto; lets the image scale down while keeping that ratio. The same rule applies to images in cards, avatars and advertising slots: reserve the space.
A realistic example
Imagine an article whose first image is a 4000 × 2667 JPG weighing 2.4 MB, displayed in an 800-pixel column. Resized to 1600 pixels wide (twice the column, for sharp rendering on high-density screens) and saved as WebP at 80%, the same photo weighs roughly 150 to 250 KB. The result depends on the picture, but a reduction of 90% is common for camera originals. Add the two dimension attributes and remove lazy loading from that one image, and both LCP and CLS improve for the cost of a few minutes.
How to measure
- PageSpeed Insights shows field data from real visitors (when your site has enough traffic) and lab data, and names the LCP element.
- Search Console has a Core Web Vitals report grouping URLs as good, needing improvement or poor.
- Browser developer tools (Lighthouse panel and Performance panel) let you test a change before publishing.
Field data lags by weeks, so after changing images, expect the report to update gradually rather than instantly.
What not to do
- Do not compress so hard that photos look blocky: visitors notice that before they notice 100 ms.
- Do not lazy-load everything blindly.
- Do not chase a perfect score at the cost of the content. A useful page that scores "good" is the goal, not 100 out of 100.
For the full workflow, start with optimizing images for a website.