Core Web Vitals in Nuxt
- 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 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 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. 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 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:
pnpm exec nuxt module add imageAfter installing the module, supply your images in public/ or configure their provider. Replace these image paths and alt text with your actual content:
<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:
<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 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 and measure the actual interaction. Debouncing alone does not guarantee good INP.
Skip Deep Reactivity on Large Payloads
useAsyncData()'s deep option now defaults to false 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:
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:
<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 generates metric-matched fallback fonts automatically, no manual size-adjust tuning:
pnpm exec nuxt module add fontaineMeasure 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:
<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 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 for continuous tracking between audits.
Use this lab recording to investigate interaction latency; field INP still requires real visits:
- Open DevTools → Performance tab
- Set CPU Throttling to an appropriate calibrated slowdown. A fixed 4x setting does not reproduce every mobile device
- Click Record
- Perform the interaction (e.g., click a button)
- Stop recording and look for the Interactions track
- Expand the slow interaction to see the breakdown: Input Delay, Processing Duration, and Presentation Delay
Breaking 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. Good metrics do not guarantee a ranking, and relevance still matters.
To count as "Good," each metric’s 75th percentile must meet its threshold. Assess mobile and desktop separately. Passing all three is achievable but not universal. The 2025 Web Almanac found that 48% of measured mobile origins and 56% of measured desktop origins passed all three in July 2025. LCP failed most often.
Checklist
- 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>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