← All articles
core web vitals seo

Core Web Vitals: LCP, INP, and CLS Optimization for SEO

Muginai Team · · 4 min read · 955 words

Core Web Vitals became a ranking factor in Google’s Page Experience update. The ranking effect is real but modest — CWV is a tiebreaker between pages of equal content quality, not a path to ranking despite inferior content. That said, for pages competing closely for positions 1-5 on commercial queries, a CWV failure can be the margin of difference.

Understanding the Three Core Web Vitals

Largest Contentful Paint (LCP): Measures when the largest visible content element (image, text block, video) renders. Target: under 2.5 seconds. Represents perceived loading speed — how quickly users see the main content.

Interaction to Next Paint (INP): Measures responsiveness — the time from user interaction (click, key press, tap) to the next visual update. Target: under 200ms. Replaced FID (First Input Delay) in March 2024. INP captures interaction throughout the page lifecycle, not just the first interaction.

Cumulative Layout Shift (CLS): Measures visual stability — how much content unexpectedly shifts during loading. Target: under 0.1. A score of 0 means zero layout shift; higher scores mean more unexpected movement.

Measurement tools:

  • Google Search Console’s Core Web Vitals report: field data (real user measurements) across your pages
  • PageSpeed Insights: lab data + field data for individual URLs
  • Chrome DevTools: lab testing with specific conditions
  • CrUX (Chrome User Experience Report): aggregated field data for any URL

Field data reflects real users; lab data reflects controlled measurements. Both matter — lab data for debugging, field data for ranking.

LCP Optimization

LCP is the most impactful CWV for SEO and the most addressable.

Identify the LCP element: Use Chrome DevTools (Performance tab → record page load → look for “LCP” marker in the timeline) or PageSpeed Insights to identify what element is the LCP candidate.

For image LCP elements:

  • Use fetchpriority="high" on the LCP image: <img src="hero.jpg" fetchpriority="high" />
  • Do NOT lazy-load the LCP image: loading="lazy" delays LCP — ensure the hero image has no lazy loading
  • Serve correctly sized images: deliver the exact pixel dimensions needed, not larger
  • Use modern formats: WebP reduces file size 25-35% vs. JPEG at equivalent quality
  • Preload the LCP image in <head>: <link rel="preload" as="image" href="hero.webp" />

For text LCP elements:

  • Eliminate render-blocking CSS that delays text render
  • Use system fonts or font-display: swap to prevent FOUT from delaying LCP
  • Reduce server response time (TTFB): LCP cannot complete before the HTML response arrives

Server-side rendering: For JavaScript-heavy pages, LCP often fails because the LCP element is rendered client-side after a large JS bundle executes. Server-side rendering or static generation moves LCP content into the initial HTML response, dramatically improving LCP.

INP Optimization

INP measures the worst interaction delay at the 98th percentile across all interactions during a page session.

Common INP causes:

  • Long JavaScript tasks blocking the main thread during user interaction
  • Large React/Vue/Angular re-renders triggered by click events
  • Heavy third-party scripts (analytics, ads, chat widgets) executing on interaction
  • Synchronous operations in event handlers

Optimization approaches:

  • Break up long tasks: any JS task over 50ms blocks the main thread. Use scheduler.postTask() or requestIdleCallback() to defer non-critical work
  • Code splitting: don’t load all JavaScript upfront. Lazy-load components and routes
  • Third-party script auditing: measure each third-party script’s contribution to INP. Remove or defer scripts that don’t justify their cost
  • Web Workers: move heavy computation off the main thread

Measuring INP: Chrome DevTools Performance Insights panel reports INP. In the field, the Long Animation Frames API helps identify problematic scripts.

CLS Optimization

CLS is usually the most fixable CWV — most CLS causes have clear solutions.

Common CLS causes:

Images without dimensions: An image without width and height attributes causes the browser to reserve no space — when the image loads, everything below shifts. Fix:

<img src="photo.jpg" width="800" height="600" alt="description" />

Web fonts causing FOUT: Flash of Unstyled Text occurs when a page renders with a system font and then swaps to the web font. font-display: swap reduces this but doesn’t eliminate layout shift from different font metrics. Use font-display: optional for fonts where the flash is acceptable, or preload critical fonts.

Ads and embeds without reserved space: Ads that load dynamically without reserved space are major CLS contributors. Assign min-height to ad containers matching the expected ad size.

Dynamically injected content: Banners, cookie consent notices, and other content injected above existing content after load causes CLS. Place in a fixed position or reserve space before load.

Reading Search Console CWV Reports

Google Search Console’s Core Web Vitals report categorizes pages as:

  • Good: Passes all three metrics
  • Needs Improvement: Failing one or more at “needs improvement” threshold
  • Poor: Failing one or more at “poor” threshold

Focus remediation on “Poor” pages first — they’re receiving the ranking disadvantage. The report groups pages by URL pattern (not individual URLs), so fixing the template underlying one URL pattern fixes many pages at once.

Caveat: CWV requires sufficient traffic to generate field data (CrUX data requires a minimum number of page views). Low-traffic pages may show “insufficient data” even if technically measured in lab tests.

CWV and JavaScript Frameworks

Modern JavaScript frameworks (React, Next.js, Nuxt, SvelteKit) have distinct CWV profiles:

  • React CSR (Client-Side Rendering): Worst default CWV — JS must download and execute before any content renders, creating high LCP. Use SSR or SSG.
  • Next.js with SSG: Excellent LCP — content in initial HTML. INP can still be high if hydration is heavy.
  • Astro: Best CWV defaults — ships minimal JS by default, LCP and INP excellent for content sites
  • WordPress: LCP often poor due to unoptimized image handling and render-blocking scripts. Address with image optimization plugins and script management.
Stop doing SEO manually.

Muginai runs keyword research, content briefs, rank tracking, and backlink monitoring — autonomously, 24/7.

Get early access → All features Pricing
← Back to blog Explore features →