Skip to content
Blog

Web

Core Web Vitals: a practical guide to fixing LCP, INP, and CLS

Core Web Vitals affect search ranking. Here's what LCP, INP, and CLS each measure, why they fail, and the specific fixes that move the numbers.

By Pykero Agency · Engineering teamJul 8, 20265 min read

TL;DR

Core Web Vitals are Google's three performance metrics that feed into search ranking: LCP (loading), INP (responsiveness), and CLS (visual stability). Each has distinct causes and specific fixes.

A performance speedometer with three metric rings glowing green on a deep navy background

Core Web Vitals are Google's attempt to quantify what "fast" feels like to a real user, and they feed into search ranking. There are three: LCP measures loading, INP measures responsiveness, and CLS measures visual stability. Passing them requires understanding what each one actually measures, because the fixes are completely different for each.

LCP: Largest Contentful Paint

LCP is the time until the biggest element in the viewport finishes rendering. That element is almost always a hero image or a large headline block. Target: under 2.5 seconds.

Common causes of a bad LCP score:

  • A large, unoptimized hero image served in the wrong format or at the wrong size
  • Render-blocking CSS or JavaScript in the <head> that delays painting
  • Slow server response (high TTFB), which the front end cannot compensate for
  • Web fonts that hold back text rendering

Serve modern formats (WebP or AVIF), size images to their display dimensions, and use <link rel="preload"> on the LCP image so the browser fetches it early. Inline your critical CSS so the browser can paint without waiting for an external stylesheet. Render HTML on the server so there is something to paint immediately. If TTFB is high, the problem is upstream: caching, hosting, or slow database queries. No amount of front-end work fixes a slow origin.

INP: Interaction to Next Paint

INP replaced First Input Delay and is stricter. It measures interaction latency across the entire page visit, not just the first tap. Click a button: how long until the screen visibly updates? Target: under 200 milliseconds. A bad INP score almost always means the main thread is blocked by JavaScript.

Fixes:

  • Break long tasks into smaller chunks so the browser can respond between them
  • Ship less JavaScript overall; code-split aggressively and lazy-load anything not needed on the first render
  • Defer non-critical work with requestIdleCallback or by explicitly yielding to the main thread
  • Keep event handlers light; move expensive computation off the synchronous path

INP is the metric most sites started failing after Google made it the official signal in 2024. It is a symptom of too much client-side JavaScript, full stop.

CLS: Cumulative Layout Shift

CLS measures unexpected movement as a page loads. Content that jumps around because something loaded late or changed size. Target: under 0.1.

Common culprits:

  • Images and iframes without explicit width and height attributes
  • Ads or banners injected above existing content
  • Web fonts triggering a reflow when they swap in
  • Dynamically inserted content that has no reserved space

Always set explicit dimensions or an aspect-ratio on media elements. Reserve space for anything that loads asynchronously. For fonts, choose font-display: optional if you can tolerate a fallback on first load, or swap with size-adjust set to minimize the layout shift when the font arrives.

Measure with the right tools

There is a distinction that matters here: field data from real users in Google's CrUX report is what actually influences ranking. Lab data from a single Lighthouse run is a diagnostic tool, nothing more. A perfect Lighthouse score on your machine means nothing if real users on mid-range Android phones are failing.

  1. Use PageSpeed Insights to see both field and lab data for any URL.
  2. Use the web-vitals JavaScript library to collect real INP and LCP distributions from your own traffic.
  3. Watch Search Console's Core Web Vitals report for trends across the whole site, not just individual pages.

Where to start

Fix LCP first. It typically delivers the biggest ranking impact and the fixes (SSR, image optimization, caching) tend to improve everything else too. Then address INP by auditing your JavaScript bundle and long tasks. Then CLS by auditing layout reservations. Treat it as ongoing maintenance, not a one-time audit. One heavy third-party analytics or chat widget can undo months of work the next time it updates.

If your Search Console is flagging poor vitals and you want them green without a full rewrite, let's talk.

core web vitalsimprove lcp scorefix cumulative layout shiftinp optimizationcore web vitals seo rankinglargest contentful paint fix

Frequently asked questions

do core web vitals affect google ranking

Yes. Google uses field data from the Chrome User Experience Report as a ranking signal. Lab scores from Lighthouse do not affect ranking directly.

what causes a bad LCP score

Usually a large unoptimized hero image, a slow server response time, or render-blocking resources in the head. Fix the image format, preload it, and check your TTFB first.

why is my INP score bad

INP fails when JavaScript blocks the main thread. Too much client-side JS, long tasks in event handlers, and synchronous work during interactions are the main culprits.

how do I measure core web vitals for real users

Use PageSpeed Insights for field data from CrUX, the web-vitals JS library for custom collection, and Search Console's Core Web Vitals report to track trends across your whole site.

How Pykero can help

Services related to this article.

Building something like this?

Pykero Agency designs and ships production web, mobile, SaaS, and AI products.

Talk to us

Discussion

Be the first to comment.

Related reading