Performance guide
How to improve Core Web Vitals: practical fixes for LCP, INP and CLS
To improve Core Web Vitals, first read your field data in PageSpeed Insights, find which of LCP, INP or CLS fails at the 75th percentile, then fix the cause for that metric: a slow hero image or server for LCP, long JavaScript tasks for INP, and unsized images, fonts or late content for CLS. Lab tools help you debug; field data decides whether you pass.
- LCP good
- 2.5 s or less
- INP good
- 200 ms or less
- CLS good
- 0.1 or less
- Measured at
- 75th percentile of page loads
Updated · By the Codebrix team
The three metrics and their thresholds
Core Web Vitals are three measurements of real user experience. Largest Contentful Paint (LCP) measures loading, Interaction to Next Paint (INP) measures how quickly the page responds to taps, clicks and key presses, and Cumulative Layout Shift (CLS) measures how much the layout jumps around.
| Metric | Measures | Good | Needs improvement | Poor |
|---|---|---|---|---|
| LCP | Loading | 2.5 s or less | 2.5 s to 4 s | Over 4 s |
| INP | Responsiveness | 200 ms or less | 200 ms to 500 ms | Over 500 ms |
| CLS | Visual stability | 0.1 or less | 0.1 to 0.25 | Over 0.25 |
Google recommends measuring at the 75th percentile of page loads, segmented by mobile and desktop. A page passes when all three metrics are good at the 75th percentile. Put simply, three out of four visits must hit the target, so a fast experience on your office Wi-Fi does not count for much if a quarter of your visitors are on slow phones.
Field data vs lab data
Field data comes from real visitors. Lab data comes from a test run in a controlled, simulated environment. You need both, for different jobs.
| Field data | Lab data | |
|---|---|---|
| Source | Chrome UX Report (CrUX): real Chrome users | Lighthouse running a simulated page load |
| Where you see it | Top of PageSpeed Insights, the CrUX API | Lower part of PageSpeed Insights, Chrome DevTools |
| Time span | The previous 28-day collection period in PageSpeed Insights | One test, right now |
| Use it to | Decide whether you pass and whether a fix worked | Find the cause and test a fix before deploying |
| Limits | Only pages and sites with enough traffic appear | Cannot fully reproduce real devices, networks and interactions |
- CrUX only includes eligible users on desktop Chrome and Chrome on Android. Chrome on iOS and other Chromium browsers do not contribute, so your iPhone visitors are not in this data.
- Not every site or page has CrUX data. Low-traffic pages may show origin-level data or none at all.
- Because field data covers 28 days, a fix you ship today takes weeks to show fully. Do not judge a change after two days.
- A Lighthouse score of 90 or above is good, but the score is not the Core Web Vitals assessment. A page can score well in the lab and still fail in the field.
- Google Search uses CrUX data for its page experience signals, which is another reason to judge by field data.
A diagnosis routine that saves time
- Run your key templates through PageSpeed Insights: home, a product or service page, a blog post, a listing page. Note mobile and desktop field results separately.
- Write down which metric fails on which template. Fix by template, not by URL, since one component usually causes the problem everywhere.
- For LCP, find the LCP element in the Lighthouse report or the DevTools Performance panel. It is usually the hero image, a heading or a background image.
- For INP, record a trace in the DevTools Performance panel while clicking the slow element and look for long tasks on the main thread.
- For CLS, turn on layout shift regions in DevTools rendering settings and reload slowly to see what moves.
- Fix, test in the lab, deploy, then add real-user monitoring so you see field results sooner than CrUX shows them.
Fixes by metric
| Metric | Common cause | Fix |
|---|---|---|
| LCP | Slow server response | Cache pages at the edge or on a CDN, render static pages at build time, reduce database calls on the critical path |
| LCP | Hero image discovered late or too large | Use a real img element rather than a CSS background, give it high fetch priority, serve modern formats at the right size |
| LCP | Render-blocking CSS, fonts and scripts | Inline critical CSS, self-host fonts, defer non-essential scripts |
| LCP | Content rendered only after JavaScript runs | Render the main content on the server so it is in the HTML |
| INP | Long JavaScript tasks on the main thread | Break work into smaller chunks and yield to the main thread between them; move heavy work off the main thread |
| INP | Too much JavaScript shipped and hydrated | Remove unused libraries, split code by route, load widgets only when needed |
| INP | Third-party scripts: chat, tag managers, A/B testing | Audit each one, remove what nobody uses, load the rest after the page is interactive |
| INP | Expensive re-renders on input | Debounce input handlers, update only what changed, keep the DOM size reasonable |
| CLS | Images and video without dimensions | Always set width and height or an aspect ratio |
| CLS | Web fonts swapping in | Self-host fonts and use a size-matched fallback font |
| CLS | Banners, ads or embeds injected above content | Reserve space for them in the layout, or place them below the fold |
| CLS | Animations that move layout | Animate transform and opacity instead of top, left, width or height |
Next.js-specific fixes
Next.js includes tools for most of the fixes above, but they only help when used correctly. These notes reflect the Next.js 16 documentation.
- Images: use next/image with width and height (or fill inside a positioned parent) so space is reserved and CLS stays low.
- LCP image: in Next.js 16 the old priority prop is deprecated in favour of preload. The docs say that in most cases you should use loading='eager' or fetchPriority='high' on the hero image instead; use preload only when one image is clearly the LCP element for every viewport.
- Responsive sizes: set the sizes prop on images that are not full width. Without it the browser assumes 100vw and may download a much larger file than needed.
- Fonts: load them through next/font. It self-hosts font files and, for Google fonts, uses an automatic fallback font by default to reduce layout shift.
- Third-party scripts: load them with next/script and pick the strategy. afterInteractive is the default; lazyOnload waits for browser idle time and suits chat widgets and non-critical tags.
- JavaScript size: keep components as Server Components unless they need interactivity, and load heavy client-only widgets with dynamic imports.
- Measure: the useReportWebVitals hook lets you send real-user metrics to your analytics, so you are not waiting 28 days for CrUX.
If you are weighing a rebuild, our Next.js vs WordPress guide covers how platform choice affects performance work.
Keep the gains after you fix them
Sites rarely get slow in one go. A new tracking tag, an unoptimised banner image or a heavy carousel each adds a little, and six months later the metrics have drifted back. A few habits stop that:
- Set a performance budget per template: maximum JavaScript size, maximum image weight, and the metric targets above.
- Run Lighthouse in your build pipeline on key templates and fail the build when the budget is broken.
- Collect real-user metrics continuously and review them monthly by template and by device.
- Make anyone who adds a third-party script name an owner for it and a date to review whether it is still needed.
- Re-check field data a month after every significant release.
At Codebrix, Core Web Vitals are part of every build rather than an add-on: images, fonts, scripts and caching are set up for them from the first sprint, and we check them before launch. If your current site is failing, our technical SEO service starts with a field-data audit, and a website redesign or Next.js development project builds the fixes in. We do not promise rankings; we fix what the field data shows and measure the result.
Frequently asked questions
What are good Core Web Vitals scores?
Google's thresholds for good are Largest Contentful Paint of 2.5 seconds or less, Interaction to Next Paint of 200 milliseconds or less, and Cumulative Layout Shift of 0.1 or less. Each is measured at the 75th percentile of page loads, separately for mobile and desktop. A page passes when all three are good.
Did INP replace FID?
Yes. Interaction to Next Paint replaced First Input Delay as a Core Web Vital on 12 March 2024. FID only measured the input delay of the first interaction, while INP considers responsiveness across interactions on the page. Any audit or guide still reporting FID as a Core Web Vital is out of date.
Why does PageSpeed Insights show good lab scores but failing field data?
Lab data is one simulated load on a fixed device and network. Field data is the last 28 days of real Chrome users on their own phones and connections, measured at the 75th percentile. Slow devices, slow networks and real interactions often expose problems a single lab run misses, especially for INP.
How long until Core Web Vitals fixes show up?
Lab results change as soon as you deploy. Field data in PageSpeed Insights covers the previous 28-day collection period, so a fix takes up to four weeks to show fully. Add real-user monitoring, for example through Next.js's useReportWebVitals hook, to see the effect within days.
What is the quickest way to improve LCP?
Find the LCP element first, usually the hero image or main heading. If it is an image, make sure it is in the HTML as an img element, sized correctly, in a modern format and fetched with high priority, not lazy-loaded. Then check server response time, since a slow server delays everything that follows.
Do Core Web Vitals affect Google rankings?
Google Search uses Chrome UX Report data for its page experience signals, so field performance is part of the picture. It is one factor among many, and relevant, useful content matters more. Improving Core Web Vitals is worth doing for users, but nobody can promise a ranking change from it.
Sources
- web.dev: Web Vitals
- web.dev: Interaction to Next Paint (INP)
- web.dev: How the Core Web Vitals thresholds were defined
- web.dev: Interaction to Next Paint becomes a Core Web Vital on March 12
- Google: About PageSpeed Insights
- Chrome for Developers: Chrome UX Report overview
- Chrome for Developers: CrUX methodology
- Next.js: Image component
- Next.js: Font module
- Next.js: Script component
- Next.js: useReportWebVitals
Related
Technical SEO
Technical SEO services that fix what stops search engines reading your site
Technical SEO services that fix crawling, indexing, Core Web Vitals, structured data and migrations in your code, with evidence for every fix.
Read moreNext.js development
Next.js development for sites and products that have to load fast and rank
Next.js development company in Noida building fast App Router sites and apps with server components, ISR and SEO built in. Fixed price, weekly demos.
Read moreWebsite redesign
Website redesign services that protect the search traffic you already have
Website redesign services that audit first, map every URL and 301-redirect old pages so the search traffic you have earned is carried to the new site.
Read moreComparison
Next.js vs WordPress for a business website: an honest comparison
Next.js vs WordPress compared on editing, speed, security, hosting and cost, with an honest list of when WordPress is the better choice for your site.
Read moreSEO
SEO services for small businesses in India that fix the foundations first
SEO services for small businesses in India: technical fixes, page structure, schema, local SEO and AI search readiness. Clear reports, no rank promises.
Read more