next/image pictures show up late or load slowly
The hero image appears after the rest of the pageShort answer
next/image loads lazily by default, so a hero image near the top waits like any other. Mark the top image loading="eager" or fetchPriority="high". Add sizes so phones do not download desktop widths, and expect the first request for each size to be slower while Next.js optimizes it.
Fix it fast
1Find out which cause you have
Find the image that is the largest above-the-fold element and see how it is declared.
grep -rn "<Image" app src components --include=*.tsx2Match what you see, then jump to its fix
- 1
The image sits at the top of the page but the browser requests it late.The top image is lazy loadedFix - 2
The Network tab shows an image far wider than its box, especially on phones.No sizes prop, so oversized files are downloadedFix - 3
A given image is slow once, then fast. AVIF is configured in images.formats.The first request for a size is optimized on demandFix - 4
The page layout is stable but the area stays blank until the file arrives.The user sees an empty box while the image loadsFix
- 1
What does the error look like?
The hero image appears after the rest of the pageThe first load of each image is slow, later loads are fast
Cause 1 of 4
The top image is lazy loaded
1Check
loading defaults to lazy, which defers the image until it nears the viewport. For an image that is the LCP element that is the wrong default.
grep -rn -E "loading=|fetchPriority|preload" app src components --include=*.tsx2Fix
Set loading="eager" or fetchPriority="high" on that one image. From Next.js 16 the old priority prop is deprecated in favour of preload, which is meant for a single image that is surely the LCP element.
import Image from 'next/image'
<Image
src="/hero.jpg"
alt="Product overview"
width={1200}
height={600}
fetchPriority="high"
/>3Verify
Reload with the Network tab open: the hero request should start with the HTML, not after scroll.
npm run build && npm run startConfirmed by nextjs.org
Cause 2 of 4
No sizes prop, so oversized files are downloaded
1Check
If sizes is missing, the browser assumes the image is as wide as the viewport (100vw). That applies to fill images and to images made responsive with CSS.
grep -rn -E "fill|sizes=" app src components --include=*.tsx2Fix
Describe the real rendered width at each breakpoint.
<Image
fill
src="/example.png"
alt="Example"
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
/>3Verify
Compare the downloaded width in the Network tab on a narrow viewport before and after.
npm run build && npm run startConfirmed by nextjs.org
Cause 3 of 4
The first request for a size is optimized on demand
1Check
The first request for an image can be slower while it is optimized. AVIF takes about 50 percent longer to encode than WebP, and each format is cached separately.
grep -n -A3 "images" next.config.*2Fix
Keep only the formats you need, and give optimized images a longer cache life with minimumCacheTTL. Remember there is no cache invalidation, so keep the value reasonable.
// next.config.js
module.exports = {
images: {
formats: ['image/webp'],
minimumCacheTTL: 14400,
},
}3Verify
Load the page twice in a production build; the second load of each image should be fast.
npm run build && npm run startConfirmed by nextjs.org
Cause 4 of 4
The user sees an empty box while the image loads
1Check
The default placeholder is empty. A blurred placeholder improves how fast the page feels. Static imports of jpg, png, webp and avif get blurDataURL automatically; remote images need one you provide.
grep -rn "placeholder" app src components --include=*.tsx2Fix
Use placeholder="blur". For a statically imported file nothing else is needed.
import Image from 'next/image'
import hero from './hero.jpg'
<Image src={hero} alt="Hero" placeholder="blur" />3Verify
Throttle the network in dev tools and watch the blurred preview appear first.
npm run devConfirmed by nextjs.org
How do I stop it coming back?
- Mark only one image per page as high priority; marking all of them removes the benefit.
- Always set sizes for fill images and CSS-responsive images.
- Use static imports for local pictures so Next.js hashes and caches them for a long time.
- Test performance on a production build, not in development.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Web apps
AuthUserPoolException: Auth UserPool not configured in a Next.js app
Auth UserPool not configured
The error means an Amplify Auth call ran before Amplify.configure did.
3 causes, each with a fixWeb apps
Apollo Server rejects a request as a potential CSRF
HTTP 400 Bad Request from the GraphQL endpoint
Apollo Server's CSRF prevention is on by default.
3 causes, each with a fixWeb apps
Clerk cannot read its publishable key in a Next.js app
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY is undefined
Clerk reads NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY.
3 causes, each with a fixWeb apps
The shell cannot find create-next-app
command not found: create-next-app
create-next-app is not meant to be installed as a shell command.
2 causes, each with a fixWeb apps
ESLint fails with: Cannot find module 'next/babel'
ESLint stops on the first file with a Babel or parser error instead of listing lint results
next/babel is a Babel preset that ships inside the next package.
3 causes, each with a fixWeb apps
ESLint says an element in a list is missing its key prop
react/jsx-key
react/jsx-key fires when an element returned from map, Array.from or an array literal has no key.
3 causes, each with a fix