Confusion Around Next.js <Image> Component for LCP / Above-the-Fold Images #90175
-
SummaryI’m a bit confused about how to properly configure the Next.js Current Understanding (Plain HTML)In standard HTML, for an LCP image, we would typically do something like: <img
src="/hero.jpg"
alt="Hero"
loading="eager"
fetchpriority="high"
/>This makes sense because:
This setup is straightforward and aligns with performance best practices. The Confusion in Next.jsAccording to the Next.js documentation for the https://nextjs.org/docs/app/api-reference/components/image#preload
It mentions not to use So which configuration is correct for an above-the-fold LCP image in Next.js? Option 1<Image
src="/hero.jpg"
alt="Hero"
loading="eager"
fetchPriority="high"
/>Option 2<Image
src="/hero.jpg"
alt="Hero"
loading="eager"
preload
/>That makes me unsure about the correct way to configure an above-the-fold LCP image in Next.js. Would really appreciate clarification on the intended pattern for LCP images so I can avoid misconfiguration and follow the framework’s performance guidance correctly. Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
This is a lovely topic... So
When you Whereas, As with most things in webdev, here you have to make a choice. For a single, clear LCP hero image, using preload is a good default. For many other cases, eager loading with high priority may be the better fit. When you say in plain HTML, I'd do this, you are considering only the case where discoverability of the image asset is not a problem. There’s a lot of nuance here, but the key distinction is whether you’re solving late discovery or network prioritization. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, @icyJoseph I'm facing this issue with LCP image optimization in Next.js. When I use
However, when I switch to using only
Due to this restriction in Next.js — where Could you please clarify what the recommended approach is in this scenario for properly optimizing the LCP image? |
Beta Was this translation helpful? Give feedback.


This is a lovely topic...
So
preloadis more about starting to download an asset, before it is actually discovered. If your LCP, over the fold image, is the buried under tons of CSS links, JS scripts, and other HTML, it won't be discovered and queued for download until the browser gets to that part of the HTML.loadingis more about, after discovery, should the browser download it eagerly, or is it ok to wait, as a function of the distance to the viewport. Note that, even if in the viewport, alazyloaded image, gets deprioritized in favor of other assets, which is why you definitely don't want to lazy load an LCP candidate, above the fold etc. - there's a level of uncertainty that you op…