Optimizing Core Web Vitals on Next.js
A slow page costs conversions and SEO. Core Web Vitals measure the real feel: loading, stability, responsiveness. Here are the concrete levers that make the biggest difference on a Next.js app.
A slow page costs conversions and SEO. Core Web Vitals measure the real feel: loading, stability, responsiveness. Here are the concrete levers that make the biggest difference on a Next.js app.
Google measures three things, and they weigh on your SEO. No point optimizing blindly: target the one in the red.
LCP is almost always dragged down by a too-heavy image or a render-blocking font. next/image and next/font fix both almost automatically.
The principle of server-side optimized images (WebP, multiple sizes) is the same as the Lambda in why AWS for an e-commerce.
width/height on images and media: the browser keeps the space, the page doesn’t jump.
display: swap avoids invisible text then the shift when the font loads.
INP suffers from thread-blocking JS. Server components ship less JS to the client.
Dynamically load what isn’t visible on first screen (modals, charts).
The biggest gain on a modern Next.js app is shipping less JavaScript to the browser. React Server Components render HTML server-side and only hydrate what’s interactive — the rest ships no client JS.
Keep ‘use client’ for the interactive leaves of the tree, not for everything. Every server component is less JS to download and run.
Core Web Vitals aren't guessed: measure first (Lighthouse, PageSpeed), fix the metric in the red, remeasure. Optimized images and fonts, reserved space, less JS thanks to server components — and an app that flies, for users and Google alike.
web.dev — Core Web Vitals ↗