---
title: "Core Web Vitals in Nuxt"
description: "Fix LCP, INP, and CLS in Nuxt with @nuxt/image, SSR defaults, and main-thread yielding, plus the DevTools workflow to prove the fix worked."
canonical_url: "https://nuxtseo.com/learn-seo/nuxt/launch-and-listen/core-web-vitals"
last_updated: "2026-10-05"
---

> Index of every page on this site: [llms.txt](https://nuxtseo.com/llms.txt)

::key-takeaways
- Assess each metric separately at the 75th percentile, segmented by mobile and desktop: good LCP ≤ 2.5s, INP ≤ 200ms, and CLS ≤ 0.1
- Google uses Core Web Vitals in its ranking systems; good scores do not guarantee a top ranking
- SSR and image delivery can affect loading performance. Measure the actual bottleneck; no Nuxt default guarantees good LCP or CLS
- Diagnose interaction latency under calibrated CPU throttling, then compare with real-user field results
::

[Core Web Vitals](https://developers.google.com/search/docs/appearance/core-web-vitals) measure loading performance, interactivity, and visual stability: LCP, INP, and CLS. Google uses them in Search ranking systems; this does not establish a separate AI Overview usability score.

## The Three Metrics

### LCP (Largest Contentful Paint)

[LCP](https://web.dev/articles/lcp) measures when the largest qualifying contentful image, text block, or video appears in the viewport. It does not measure every visible element.

**Thresholds:**

- Good: ≤ 2.5 seconds
- Needs improvement: > 2.5 and ≤ 4.0 seconds
- Poor: > 4.0 seconds

### INP (Interaction to Next Paint)

INP measures responsiveness throughout the entire page session. It [replaced First Input Delay (FID) on March 12, 2024](https://web.dev/blog/inp-cwv-march-12). INP summarizes interaction latency across a page visit. A good score does not guarantee every interaction is fast.

**Thresholds:**

- Good: ≤ 200 milliseconds
- Needs improvement: > 200 and ≤ 500 milliseconds
- Poor: > 500 milliseconds

### CLS (Cumulative Layout Shift)

[CLS](https://web.dev/articles/cls) measures the largest burst of eligible layout shifts in a session window. Shifts shortly after qualifying user input are excluded. Undimensioned images, changing font metrics, and dynamic content can contribute.

**Thresholds:**

- Good: ≤ 0.1
- Needs improvement: > 0.1 and ≤ 0.25
- Poor: > 0.25

## Nuxt LCP Optimizations

Nuxt enables SSR by default. Initial HTML can expose content earlier, but server response time, resources, and rendering work also affect LCP. Measure the deployed page rather than assuming one mode always performs better.

### Image Optimization with @nuxt/image

Install the Nuxt Image module for automatic image optimization:

```bash
pnpm exec nuxt module add image
```

After installing the module, supply your images in public/ or configure their provider. Replace these image paths and alt text with your actual content:

```vue
<template>
  <div>
    <!-- Above-fold: prioritize LCP image -->
    <NuxtImg
      src="/hero.jpg"
      alt="Hero"
      width="1200"
      height="600"
      :preload="{ fetchPriority: 'high' }"
    />

    <!-- Below-fold: lazy loading -->
    <NuxtImg
      src="/product-1.jpg"
      alt="Product"
      width="800"
      height="600"
      loading="lazy"
    />
  </div>
</template>
```

Nuxt Image supports `preload`. The object form above sets high fetch priority on the preload hint. Avoid lazy loading for the LCP image; measure the result on your page.

### Preload Critical Assets

Add preload hints in your page or layout:

```vue
<script setup lang="ts">
useHead({
  link: [
    {
      rel: 'preload',
      href: '/fonts/inter-var.woff2',
      as: 'font',
      type: 'font/woff2',
      crossorigin: ''
    }
  ]
})
</script>
```

## Nuxt INP Optimizations (Advanced)

Long JavaScript tasks can block the main thread and delay interaction feedback.

### Yield to the Browser

Break up long tasks so the browser can paint updates between computations.

[Feature-detect scheduler.yield](https://developer.chrome.com/blog/use-scheduler-yield) before using it. Browser support varies. Yielding can let pending rendering work run between chunks; it does not make heavy work cheaper. Use a timer fallback where needed. Keep browser APIs inside client-side interaction code. The app’s loading-state and computation functions are not supplied here.

### Debounce Event Handlers

Debounce rapid input events when the reader task permits a short delay. Follow the [VueUse useDebounceFn reference](https://vueuse.org/shared/useDebounceFn/) and measure the actual interaction. Debouncing alone does not guarantee good INP.

### Skip Deep Reactivity on Large Payloads

`useAsyncData()`{lang="ts"}'s `deep` option [now defaults to `false`](https://nuxt.com/docs/api/composables/use-async-data) in current Nuxt, so large API responses aren't made deeply reactive automatically. Passing it explicitly is a no-op on current Nuxt but documents the intent, and matters if you're on an older version:

```ts
const { data } = await useAsyncData('products', () => $fetch('/api/products'), {
  deep: false // reactivity opt-out for large payloads
})
```

## Nuxt CLS Fixes

### Set Image Dimensions

Provide image dimensions, or another reliable aspect-ratio constraint, to reserve layout space:

```vue
<template>
  <NuxtImg
    src="/product.jpg"
    alt="Product"
    width="800"
    height="600"
  />
</template>
```

### Match Fallback Fonts Automatically

A web font can shift layout when its metrics differ from the fallback font. [`@nuxtjs/fontaine`](https://github.com/nuxt-modules/fontaine) generates metric-matched fallback fonts automatically, no manual `size-adjust` tuning:

```bash
pnpm exec nuxt module add fontaine
```

Measure your chosen font and fallback in the app. Metric overrides can reduce shifts; the result depends on the fonts and layout.

### Reserve Space for Dynamic Content

This template excerpt requires app-owned pending and data state, such as an awaited useFetch result. Reserve space matching the expected content:

```vue
<template>
  <div class="content">
    <div v-if="pending" class="skeleton h-[200px] w-full" />
    <div v-else class="h-[200px] w-full">
      {{ data }}
    </div>
  </div>
</template>
```

## Measuring Core Web Vitals

[PageSpeed Insights](https://pagespeed.web.dev/) shows CrUX field data when enough qualifying visits exist. Check whether its results describe the URL or the origin; keep those scopes separate. Supplement it with Real User Monitoring (RUM) tools like [Datadog](https://www.datadoghq.com/product/real-user-monitoring/) for continuous tracking between audits.

Use this lab recording to investigate interaction latency; field INP still requires real visits:

1. Open DevTools → **Performance** tab
2. Set **CPU Throttling** to an appropriate calibrated slowdown. A fixed 4x setting does not reproduce every mobile device
3. Click **Record**
4. Perform the interaction (e.g., click a button)
5. Stop recording and look for the **Interactions** track
6. Expand the slow interaction to see the breakdown: **Input Delay**, **Processing Duration**, and **Presentation Delay**

[Breaking long tasks](https://web.dev/articles/optimize-long-tasks) into chunks under 50ms keeps the main thread responsive, though the bigger win is usually yielding strategically at the right points rather than chopping every task uniformly.

Field data describes real visits. Lab diagnostics help identify causes under a chosen test condition. Keep their windows, devices, and measurement methods separate.

## Core Web Vitals Impact on Rankings

Google [uses Core Web Vitals alongside other ranking signals](https://developers.google.com/search/docs/appearance/core-web-vitals). Good metrics do not guarantee a ranking, and relevance still matters.

To count as "Good," each metric’s [75th percentile](https://web.dev/articles/defining-core-web-vitals-thresholds) must meet its threshold. Assess mobile and desktop separately. Passing all three is achievable but not universal. The [2025 Web Almanac](https://almanac.httparchive.org/en/2025/performance) found that 48% of measured mobile origins and 56% of measured desktop origins passed all three in July 2025. LCP failed most often.

## Checklist

::checklist{#nuxt-core-web-vitals}
- Check each metric’s p75 against its good threshold, separately for mobile and desktop; confirm available field data and URL/origin scope
- Serve the LCP image with `<NuxtImg preload>`{lang="html"} and preload critical fonts
- Feature-detect scheduler APIs before client-side use; provide a fallback for unsupported browsers
- Reserve image layout space and check font fallback metrics separately
- Use calibrated CPU throttling for interaction diagnosis; confirm field results with CrUX or RUM
::

## Sitemap

See the full [sitemap](https://nuxtseo.com/sitemap.md) for all pages.
