# Next.js lazy loading

> Lazy load images with next/image and Client Components with next/dynamic or React.lazy, and keep the hero image eager so LCP does not suffer.

Canonical: https://scaplet.com/seo/nextjs/lazy-loading

Guide Next.js Next.js · Page speed

Lazy load images with next/image and Client Components with next/dynamic or React.lazy, and keep the hero image eager so LCP does not suffer.

4 min

read

4

sources

Oct 28, 2026

updated

Scaplet Editorial Team

author

In one line

In Next.js, `next/image` defaults to `loading="lazy"`, so you only act on above-the-fold images. For JavaScript, lazy load Client Components with `next/dynamic` or `React.lazy()` with Suspense, or load a library with `import()` when needed. Never lazy load the Largest Contentful Paint image: web.dev says not to lazy-load images likely to be in the viewport at load.

30-second check

## Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fnextjs%2Flazy-loading%20(%22Next.js%20lazy%20loading%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fnextjs%2Flazy-loading%20(%22Next.js%20lazy%20loading%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fnextjs%2Flazy-loading%20(%22Next.js%20lazy%20loading%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fnextjs%2Flazy-loading%20(%22Next.js%20lazy%20loading%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

## At a glance

4 facts from the sources below

`loading="lazy"`

Image default

`next/dynamic` or `React.lazy()` with Suspense

Component API

Client Components and imported libraries

Applies to

Keep eager

Hero image

_01_What you lazy load, and how Next.js does it

## Two kinds of lazy loading, two different files

What

### Images

How

`<Image loading="lazy" />` from `next/image`

Default

Defaults to lazy

What

### Client Components

How

`dynamic(() => import('../components/A'))` from `next/dynamic`

Default

Loaded in a separate client bundle

What

### Libraries

How

`await import('fuse.js')` inside an event handler

Default

Loaded only when the code runs

What

### Server Components

How

Nothing to do

Default

Automatically code split, and streaming sends UI in pieces

The Next.js [lazy loading](/glossary/lazy-loading) guide says lazy loading "applies to Client Components": Server Components are already code split. It also notes that `next/dynamic` is a composite of `React.lazy()` and Suspense, and that it behaves the same way in the `app` and `pages` directories, which helps if you are migrating.

_02_Checklist

## Lazy load a Client Component

Three behaviors are in that one file. `ComponentA` still renders on first load but ships in its own bundle. `ComponentB` is not fetched until the condition is true. `ComponentC` with `ssr: false` is not prerendered, so its HTML is absent from the server response. Keep that last point in mind for anything you want indexed: content that only exists after client-side loading may not be in the HTML a crawler first receives.

First_2_
**`ssr: false` is for Client Components only.** The docs say it is not supported in Server Components and show the error "ssr: false is not allowed with next/dynamic in Server Components. Please move it into a Client Component."

**Dynamically importing a Server Component only lazy loads its Client Component children.** The Server Component itself is not lazy loaded. The docs add that this helps [preload](/glossary/preload) static assets such as CSS.

Next_2_
**Automatic code splitting is not supported yet when a Server Component dynamically imports a Client Component.** The docs list this as a current limitation.

**Named exports need a `.then()`.** Return the export from the promise: `import('../components/hello').then((mod) => mod.Hello)`.

Then_1_
**Add a `loading` option when the gap is visible.** `dynamic(() => import('../components/WithCustomLoading'), { loading: () => <p>Loading...</p> })` renders a placeholder while the chunk loads.

app/page.js (from the Next.js docs)

```
'use client' import { useState } from 'react' import dynamic from 'next/dynamic' // Client Components: const ComponentA = dynamic(() => import('../components/A')) const ComponentB = dynamic(() => import('../components/B')) const ComponentC = dynamic(() => import('../components/C'), { ssr: false }) export default function ClientComponentExample() { const [showMore, setShowMore] = useState(false) return ( <div> {/* Load immediately, but in a separate client bundle */} <ComponentA /> {/* Load on demand, only when/if the condition is met */} {showMore && <ComponentB />} <button onClick={() => setShowMore(!showMore)}>Toggle</button> {/* Load only on the client side */} <ComponentC /> </div> ) }
```

_03_Check it

## Load a library only when it is used

For a heavy dependency that only one interaction needs, skip components entirely and call `import()` inside the handler. The Next.js example loads `fuse.js` for fuzzy search only after the user types in the input.

Load fuse.js on first keystroke

```
'use client' import { useState } from 'react' const names = ['Tim', 'Joe', 'Bel', 'Lee'] export default function Page() { const [results, setResults] = useState() return ( <div> <input type="text" placeholder="Search" onChange={async (e) => { const { value } = e.currentTarget // Dynamically load fuse.js const Fuse = (await import('fuse.js')).default const fuse = new Fuse(names) setResults(fuse.search(value)) }} /> <pre>Results: {JSON.stringify(results, null, 2)}</pre> </div> ) }
```

_04_Props that control when an image loads

## Images: change the default only above the fold

The `next/image` reference lists `loading` as defaulting to lazy, where `lazy` means "Defer loading the image until it reaches a calculated distance from the viewport" and `eager` means "Load the image immediately, regardless of its [position](/glossary/average-position) in the page." That default is right for most images. The risk is the one image that matters for speed.

Prop

### `loading="eager"`

What the docs say

Loads the image immediately regardless of position

Use it when

The image is [above the fold](/glossary/above-the-fold)

Prop

### `fetchPriority="high"`

What the docs say

Named in the docs as an alternative to `preload`; web.dev says it raises [fetch priority](/glossary/fetchpriority) for an important image such as the LCP image

Use it when

Several candidate LCP images exist, or the image is inside a pattern that cannot use `preload`

Prop

### `preload={true}`

What the docs say

Inserts a `<link>` in the `<head>`; docs say to use it for the LCP element, but in most cases use `loading="eager"` or `fetchPriority="high"` instead

Use it when

One image is clearly the LCP element at every viewport

Prop

### `priority`

What the docs say

Deprecated in Next.js 16 in favor of `preload`

Use it when

Only in older code; plan to migrate

**Do not lazy load the LCP image**web.dev's guidance: "Don't lazy-load images that are likely to be in-viewport when the page loads, especially LCP images." Because `next/image` is lazy by default, a hero image you forget to change is lazy. Find the LCP element, then set `loading="eager"` or `fetchPriority="high"` on it.

Hero image that loads early

```
import Image from 'next/image' export function Hero() { return ( <Image src="/hero.jpg" alt="Product dashboard overview" width={1200} height={630} loading="eager" /> ) }
```

Do not combine them. The docs say not to use `preload` together with `loading` or `fetchPriority`, and web.dev notes that `loading="lazy"` with `fetchpriority="high"` is still delayed while off-screen. For light and dark variants of one image, the docs explain that `preload` or `loading="eager"` would make both images load, so use `fetchPriority="high"` there.

_05_How it works

## Check it worked

For image alt text and responsive delivery, see [Next.js image SEO](/seo/nextjs/image-seo). For the rest of a speed pass, see the [Next.js SEO guides](/seo/nextjs).

1. 01

### Inspect the hero markup

Open the page, right-click the largest above-the-fold image, choose Inspect, and confirm the `<img>` does not have `loading="lazy"`.
2. 02

### Watch chunks load on interaction

Open DevTools, go to the Network tab, filter by JS, then click the control that opens your lazy component. A new chunk request should appear at that moment, not on first load.
3. 03

### Confirm the LCP element

In Chrome DevTools, the Performance panel's live metrics view shows your local LCP next to the [CrUX](/glossary/chrome-ux-report) value, and a performance trace's Insights break LCP into subparts. web.dev defines resource load delay as the time between [TTFB](/glossary/time-to-first-byte) and when the browser starts loading the LCP resource, so a large value for an image means loading started late.
4. 04

### Disable JavaScript for ssr: false parts

View source or turn off JavaScript to see what the server sent. Anything you wrapped with `ssr: false` will be missing there by design.

Questions

## Asked a lot.

3 questions people ask next, answered from the sources on this page.

_01_ Is next/image lazy loaded by default?

Yes. The Next.js reference says `loading` defaults to lazy. Set `loading="eager"` or `fetchPriority="high"` on an above-the-fold image.

_02_ When should I use ssr: false in next/dynamic?

Only inside a Client Component, and only when a component cannot or should not be prerendered. The option is not supported in Server Components, and the component's HTML will not be in the server response.

_03_ Is priority still valid in Next.js 16?

It is deprecated in favor of `preload`, according to the `next/image` reference. The same page says to use `loading="eager"` or `fetchPriority="high"` in most cases rather than `preload`.

Sources · 4

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- nextjs.org
- web.dev

1. 01 [How to lazy load Client Components and libraries | Next.js Documentation](https://nextjs.org/docs/app/guides/lazy-loading) nextjs.org · checked 2026-11-01
2. 02 [Image Component | Next.js Documentation](https://nextjs.org/docs/app/api-reference/components/image) nextjs.org · checked 2026-11-01
3. 03 [Browser-level image lazy loading for the web | web.dev](https://web.dev/articles/browser-level-image-lazy-loading) web.dev · checked 2026-11-01
4. 04 [Optimize Largest Contentful Paint | web.dev](https://web.dev/articles/optimize-lcp) web.dev · checked 2026-11-01

## Keep learning

[All platform guides](/seo)

[Learn Next.js SEO Frameworks](/seo/nextjs) [Related LCP image is lazy-loaded Performance](/seo-issues/lazy-loaded-lcp-image) [Read next Next.js image SEO Frameworks](/seo/nextjs/image-seo) [Do Run a free site audit Free, about two minutes](/site-audit)

More in Next.js SEO
[Next.js 404 page](/seo/nextjs/404) [Next.js AI crawlers](/seo/nextjs/ai-crawlers) [Next.js canonical tags](/seo/nextjs/canonical-tags) [Next.js Google Analytics](/seo/nextjs/google-analytics) [Next.js image SEO](/seo/nextjs/image-seo) [Next.js lazy loading](/seo/nextjs/lazy-loading) [Next.js noindex](/seo/nextjs/noindex) [Next.js redirects](/seo/nextjs/redirects) [Next.js robots.txt](/seo/nextjs/robots-txt) [Next.js structured data](/seo/nextjs/structured-data) [Next.js title and meta description](/seo/nextjs/title-and-meta) [Next.js XML sitemap](/seo/nextjs/xml-sitemap)

Terms on this page
[Lazy loading](/glossary/lazy-loading) [preload](/glossary/preload) [Average position](/glossary/average-position) [Above the fold](/glossary/above-the-fold) [fetchpriority](/glossary/fetchpriority) [Chrome UX Report (CrUX)](/glossary/chrome-ux-report) [Time to First Byte (TTFB)](/glossary/time-to-first-byte)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

Run the free audit, then approve the fixes. Every change can be undone.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
