---
title: "How to Improve Core Web Vitals in a Nuxt or Vue App"
description: "A practical guide to improving Largest Contentful Paint, Interaction to Next Paint, and Cumulative Layout Shift in Nuxt and Vue applications, with the most common causes and fixes for each metric."
canonical_url: "https://cinnamon.digital/insights/core-web-vitals-for-nuxt-and-vue"
---

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

**Core Web Vitals measure how fast a page loads, how quickly it responds, and how stable it looks while loading.** Nuxt gives you a strong starting point with server rendering and automatic code splitting, but most real-world problems come from images, third-party scripts, heavy components, and layout shifts. Here is how to find and fix them.

## The three metrics

<table>
<thead>
  <tr>
    <th>
      Metric
    </th>
    
    <th>
      Measures
    </th>
    
    <th>
      Good threshold
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Largest Contentful Paint (LCP)
    </td>
    
    <td>
      When the main content becomes visible
    </td>
    
    <td>
      2.5 seconds or less
    </td>
  </tr>
  
  <tr>
    <td>
      Interaction to Next Paint (INP)
    </td>
    
    <td>
      How quickly the page responds to clicks, taps, and key presses
    </td>
    
    <td>
      200 milliseconds or less
    </td>
  </tr>
  
  <tr>
    <td>
      Cumulative Layout Shift (CLS)
    </td>
    
    <td>
      How much content unexpectedly moves
    </td>
    
    <td>
      0.1 or less
    </td>
  </tr>
</tbody>
</table>

Google evaluates these at the 75th percentile of real visits, so your slowest quarter of users matters.

## Step 1: Measure with real-user data

- Check the Core Web Vitals report in Google Search Console to see which page groups fail.
- Use PageSpeed Insights to compare field data with a lab run for a specific URL.
- For ongoing tracking, collect metrics from real users with the `web-vitals` library and send them to your analytics.

Use Lighthouse and Chrome DevTools performance recordings to debug, but confirm improvements in field data.

## Step 2: Improve LCP

Common causes and fixes in Nuxt and Vue apps:

- **Client-only rendering.** Make sure key pages use SSR or prerendering so content is in the initial HTML.
- **Large hero images.** Use `@nuxt/image` (`<NuxtImg>` or `<NuxtPicture>`) to serve modern formats at the right size, and mark the LCP image with `preload` and `fetchpriority="high"`. Never lazy-load the LCP image.
- **Slow server responses.** Cache rendered pages or API responses with route rules, use a CDN, and avoid slow data fetching that blocks rendering.
- **Render-blocking fonts and CSS.** Self-host fonts, preload the most important weights, use `font-display: swap`, and avoid loading large CSS bundles you do not need.

## Step 3: Improve INP

INP problems come from JavaScript keeping the main thread busy when users interact.

- **Heavy hydration.** Reduce what has to hydrate on load. Use lazy components (the `Lazy` prefix in Nuxt) for content below the fold, and consider lazy hydration options for components that do not need to be interactive immediately.
- **Large dependencies.** Analyze your bundle and replace or lazy-load heavy libraries such as charting, editors, and date libraries.
- **Expensive event handlers.** Keep handlers short, defer non-urgent work, and debounce input-driven work such as filtering and search.
- **Large reactive lists.** Use virtual scrolling for long lists and avoid deep reactivity on large datasets with `shallowRef`.
- **Third-party scripts.** Load analytics, chat widgets, and tag managers after the page is interactive. Nuxt Scripts can help control when and how they load.

## Step 4: Improve CLS

- **Images and media without dimensions.** Always set `width` and `height` or use CSS `aspect-ratio`.
- **Late-loading content.** Reserve space for banners, ads, embeds, and cookie notices instead of pushing content down.
- **Web fonts.** Font swaps can shift text. Use fallback fonts with matching metrics; `@nuxt/fonts` can generate these automatically.
- **Client-only components.** Content that appears only after hydration, such as `<ClientOnly>` blocks, should have a placeholder of the same size.

## Step 5: Prevent regressions

Performance tends to degrade as features are added. Keep it in check by:

- Running Lighthouse checks in your CI pipeline with budgets for key pages.
- Reviewing bundle size changes in pull requests.
- Watching field data trends after every major release.
- Reviewing new third-party scripts before they are added.

## Where to start

Find your worst-performing page template in Search Console, record a performance profile, and fix the single biggest cause first. Images and third-party scripts are the most common culprits. If you want a team to audit and improve your frontend performance, our [frontend engineering and product UI](https://cinnamon.digital/services/frontend-engineering-product-ui) team specializes in Vue and Nuxt applications.

## Sitemap

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