A practical, metric-driven guide to making Next.js apps fast: hit LCP under 2.5s, INP under 200ms and CLS under 0.1 with images, fonts, streaming, caching and less JavaScript.

Francis K Njenga
Senior Developer
Speed is a feature. Google has used Core Web Vitals as a ranking signal for years, and real-user studies keep showing the same pattern: faster pages convert better, bounce less and earn more trust. The good news for Next.js developers is that the framework already ships most of the machinery you need — the trick is knowing which levers to pull, and in what order.
This playbook is organized around the three metrics that actually matter in 2026, measured at the 75th percentile of real users (not your laptop on office Wi-Fi):
| Metric | What it measures | Good | Poor |
|---|---|---|---|
| LCP — Largest Contentful Paint | Loading: when the main content appears | ≤ 2.5 s | > 4 s |
| INP — Interaction to Next Paint | Responsiveness: worst interaction latency across the visit | ≤ 200 ms | > 500 ms |
| CLS — Cumulative Layout Shift | Stability: unexpected movement of content | ≤ 0.1 | > 0.25 |
Measure before you optimize. Run Lighthouse for lab diagnostics, then confirm with field data from the Chrome UX Report (CrUX) or the web-vitals library. Lab scores and real-user scores regularly disagree — the field is the one Google watches.
In most marketing sites and dashboards, the LCP element is the hero image or the headline. Three moves cover 90% of cases:
next/image with priority on the LCP image. It preloads the image, serves AVIF/WebP, and sizes it responsively. Never lazy-load anything above the fold.next/font. Zero layout shift, zero extra network round-trips to Google Fonts, and automatic font-display: swap handling.import Image from "next/image";
import { Inter } from "next/font/google";
const inter = Inter({ subsets: ["latin"], display: "swap" });
export default function Home() {
return (
<section className={inter.className}>
<h1>Ship faster websites</h1>
<Image
src="/images/hero.webp"
alt="Developer workspace"
width={1600}
height={900}
priority // preload — this is the LCP element
sizes="100vw"
/>
</section>
);
}priority preloads the hero; next/font removes the font round-trip entirely.
Every kilobyte of client JS must be downloaded, parsed and executed before the page becomes interactive — and mid-range phones pay that tax at roughly 4–6× the cost of your development machine. The App Router's superpower is that Server Components ship zero JS by default. Keep data fetching and static markup on the server, and lazy-load the heavy interactive pieces:
next/dynamic only when they are needed.@next/bundle-analyzer monthly. One accidental import _ from "lodash" can add 70 kB gzip.import dynamic from "next/dynamic";
const RevenueChart = dynamic(() => import("./revenue-chart"), {
ssr: false,
loading: () => <div className="chart-skeleton" aria-busy="true" />,
});
export function AnalyticsPanel() {
return (
<section>
<h2>Revenue</h2>
<RevenueChart />
</section>
);
}ssr: false keeps browser-only libraries out of the server bundle.
INP replaced FID in March 2024 and it is stricter: it looks at the worst interaction of the whole visit, not just the first one. The usual suspects are long tasks — big synchronous renders, JSON parsing of huge payloads, and expensive work inside event handlers.
useTransition so typing and clicks stay snappy."use client";
import { useState, useTransition } from "react";
export function ProductSearch({ products }: { products: Product[] }) {
const [query, setQuery] = useState("");
const [filtered, setFiltered] = useState(products);
const [isPending, startTransition] = useTransition();
function onChange(value: string) {
setQuery(value); // urgent: keep the input instant
startTransition(() => {
setFiltered(
products.filter((p) => p.name.toLowerCase().includes(value.toLowerCase()))
);
});
}
return (
<div>
<input value={query} onChange={(e) => onChange(e.target.value)} />
<ul style={{ opacity: isPending ? 0.7 : 1 }}>
{filtered.map((p) => <li key={p.id}>{p.name}</li>)}
</ul>
</div>
);
}React keeps the input responsive while the filtered list catches up.
Layout shift is almost always preventable. Give every image and video explicit dimensions (or an aspect-ratio container), reserve slots for ads and embeds, and never insert content above existing content after load. Skeletons should match the final layout's geometry — a skeleton that is 40 px shorter than the real card still causes shift.
Two App Router features do disproportionate work:
<Suspense> so the shell paints immediately and slow data arrives progressively. Next.js 16's Cache Components push this further with explicit "use cache" boundaries.revalidate on fetches and pages instead of letting everything default to dynamic. A product page that revalidates every 60 seconds serves static-speed HTML to nearly everyone.import { Suspense } from "react";
import { Recommendations } from "@/components/recommendations";
export const revalidate = 60; // ISR: regenerate at most once a minute
async function getProduct(id: string) {
const res = await fetch("https://api.example.com/products/" + id, {
next: { revalidate: 60 },
});
return res.json();
}
export default async function ProductPage({
params,
}: {
params: Promise<{ id: string }>;
}) {
const { id } = await params;
const product = await getProduct(id);
return (
<main>
<h1>{product.name}</h1>
<p>{product.description}</p>
<Suspense fallback={<div className="recs-skeleton" />}>
<Recommendations productId={id} />
</Suspense>
</main>
);
}Suspense + revalidate: fast first paint without stale-forever content.
next/image + priority + correct sizesnext/font, no render-blocking font CSSKeep it fast. Performance is not a one-time project — it is a budget you defend on every pull request. If your team would rather have experts audit and fix the whole stack, talk to Frank Tech — performance optimization is one of our core services.

Senior Developer
Francis Njenga is an experienced Lead Developer specializing in React, Next.js, and modern JavaScript frameworks, with a strong background in web development.