Core Web Vitals fixes that actually work: LCP, INP and CLS
Most Core Web Vitals advice fails for one reason: it optimizes the lab score while Google ranks you on field data — the 75th percentile of real visits over 28 days. Fixing the right thing means knowing what you're graded on, then attacking the specific element or interaction that's failing. Here's how, metric by metric.
1Know the thresholds — and where your real data lives
| Metric | Measures | Good | Failing |
|---|---|---|---|
| LCP — Largest Contentful Paint | Load speed of the biggest visible element | ≤ 2.5s | > 4.0s |
| INP — Interaction to Next Paint | Responsiveness to clicks/taps/keys | ≤ 200ms | > 500ms |
| CLS — Cumulative Layout Shift | Visual stability while loading | ≤ 0.1 | > 0.25 |
Pull your field numbers from the Chrome UX Report before touching any code:
curl -s "https://chromeuxreport.googleapis.com/v1/records:queryRecord?key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://your-site.com/"}' | python3 -m json.tool | head -40
No CrUX data for a low-traffic page? Origin-level data or Lighthouse (npx lighthouse https://your-site.com --preset=desktop) is your fallback — just remember lab numbers are a debugging tool, not the grade.
2LCP: find the element, then cut its four delays
LCP is almost always one element — a hero image, a product photo, or a big heading. Identify it first (Lighthouse's "Largest Contentful Paint element" diagnostic tells you exactly which node it is). Then remember LCP = four phases stacked: server response (TTFB) → resource discovery → resource download → render. Fixes map to phases:
<!-- Tell the browser about the hero image in the HTML head,
don't make it discover it from CSS or JS -->
<link rel="preload" as="image" href="/hero-800.avif" fetchpriority="high">
<img src="/hero-800.avif" fetchpriority="high" alt="...">
fetchpriority="high", and never lazy-load the LCP image. Download → serve AVIF/WebP at the actual display size (a 2400px hero shown at 800px is a second of LCP by itself). Render → remove render-blocking third-party scripts from <head>.3INP: the problem is long tasks, not "slow JavaScript"
INP replaced FID in March 2024 and it grades every interaction, not the first. When a user taps a menu and nothing visibly happens for 600ms, that's a long task (>50ms) hogging the main thread — usually hydration, an oversized event handler, or a third-party tag doing synchronous work on click.
// Break a long handler into chunks so paint can happen between them:
async function handleSubmit(e) {
showSpinner(); // visual feedback NOW
await new Promise(r => setTimeout(r)); // yield to let the browser paint
heavyValidation(); // long work runs after the paint
}
requestIdleCallback or a web worker; audit third-party scripts — tag managers are the single most common INP killer we see in scans.4CLS: reserve space for everything that loads late
CLS is the most mechanical of the three: something loads without reserved space and shoves content down. The fixes are boring and total:
<!-- Always size images and embeds -->
<img src="photo.jpg" width="800" height="450" alt="...">
<!-- or in CSS for responsive images -->
img { aspect-ratio: 16 / 9; width: 100%; height: auto; }
font-display: swap without a size-matched fallback), can each cost 0.1+ alone.aspect-ratio on every media element; statically reserve the ad slot's min-height; overlay banners instead of pushing layout; use font-display: optional or a tuned fallback via size-adjust.The 30-minute triage
| Step | Do this | You're looking for |
|---|---|---|
| 1 | Query CrUX for field data | Which metric actually fails at p75 |
| 2 | Run Lighthouse on the worst page template | The exact LCP node + long-task list |
| 3 | Preload LCP image, add fetchpriority | LCP discovery delay gone |
| 4 | Profile one interaction at 4× CPU | The long task behind bad INP |
| 5 | Add width/height + aspect-ratio everywhere | Layout shifts eliminated in filmstrip |
| 6 | Re-check CrUX in 28 days | Field score confirms the fix |
One warning: field data lags ~4 weeks, so ship fixes, verify in lab, and resist re-judging before the CrUX window rolls over. Changing five things at once and watching daily is how teams talk themselves out of working fixes.
SITEDOCTOR checks your Core Web Vitals lab metrics, render-blocking resources, un-sized images and slow scripts automatically — plus security headers, SSL and SEO — in one scan. Free instant scan, no signup.
Get a free scan →