Alle Artikel

1. Dezember 2026

Next.js Image component and LCP: sizing, preload and fetchPriority, 2026

Set width, height and sizes correctly, then pick preload or fetchPriority for the LCP image. What the Next.js 16 docs say about the Image component.

Row of outlined and filled vertical bars with one acid bar on a dotted canvas
Illustration: Kallos Labs.

Introduction

On most marketing pages the Largest Contentful Paint (LCP) element is an image, usually the hero. The Next.js Image component can make that image fast or slow, and three settings decide which: the dimensions you declare, the sizes value you give the browser, and how you tell it to load the first image.

The target is clear. web.dev says sites should strive for an LCP of 2.5 seconds or less, measured at the 75th percentile of page loads and segmented across mobile and desktop. Above 4.0 seconds counts as poor. This guide follows the Next.js Image reference, whose page was last updated on 2026-11-18, and covers sizing, the loading hints, remote images and how to check the result.

Sizing: width, height, fill and sizes

width and height reserve space

The width and height props are the image's intrinsic size in pixels. Next.js uses them to infer the aspect ratio and reserve space for the image, which avoids layout shift while it loads. They do not set the rendered size: CSS does that. You must set both unless the image is a static import or uses fill.

A common mistake: putting the displayed size in these props. Use the real pixel size of the source file, then size the element with CSS.

fill for unknown dimensions

When you do not know the dimensions, the docs recommend fill. The image expands to its parent element, so the parent needs a position of relative, fixed or absolute. The image itself defaults to position: absolute. Use object-fit (contain or cover) to control cropping.

sizes tells the browser how wide the image will be

Use sizes when the image uses fill or CSS makes it responsive. The docs state the risk plainly: if sizes is missing, the browser assumes the image will be as wide as the viewport (100vw). A card that fills a third of a desktop screen then downloads a file chosen for the full width.

With sizes, Next.js generates a full srcset (640w, 750w and so on). Without it, an image with a width gets a limited 1x/2x srcset, and a fill image gets one built from deviceSizes only. The defaults are [640, 750, 828, 1080, 1200, 1920, 2048, 3840] for deviceSizes and [32, 48, 64, 96, 128, 256, 384] for imageSizes.

Write sizes to match the layout, breakpoint by breakpoint:

<Image
  src="/hero.jpg"
  alt="Product dashboard on a laptop"
  fill
  sizes="(max-width: 768px) 100vw, 50vw"
/>

If the image takes the full width on small screens and half the width above 768px, that is exactly what the value should say.

Preload, eager or fetchPriority for the LCP image

priority is deprecated from Next.js 16

Older guidance told you to add priority to the LCP image. The docs now say that starting with Next.js 16, priority is deprecated. Use preload to keep the same preloading behavior, or loading="eager" if you only need to disable lazy loading. The version history lists v16.0.0 as the release that added preload and deprecated priority.

Which one to pick

  • One known LCP image, such as a hero: set preload. It inserts a <link> in the <head>, so the browser discovers the image early.
  • Above-the-fold image, no need for a preload link: the docs say that in most cases you should use loading="eager" to disable lazy loading, and add fetchPriority="high" to ask the browser to prioritize that request over other images.
  • Different LCP images at different viewports: do not use preload. The docs say not to use it when several images could be the LCP element depending on viewport, or when loading or fetchPriority is used. The same goes for a light and dark theme pair where only one should load: use fetchPriority="high" there.

One detail catches people out. fetchPriority alone does not disable lazy loading. Pair it with loading="eager".

<Image
  src="/hero.jpg"
  alt="Product dashboard on a laptop"
  width={1600}
  height={900}
  sizes="100vw"
  loading="eager"
  fetchPriority="high"
/>

What fetch priority can and cannot do

web.dev's Fetch Priority guide reports that boosting the LCP image with fetchpriority="high" made LCP happen sooner: on Google Flights, LCP improved from 2.6s to 1.9s. That's one site's test. Treat it as an example of the size of the effect, not a promise.

The guide also sets limits. Images start at low priority and are boosted after layout, so high lets the image start early. Fetch Priority is not preload: preload helps the browser discover a resource, while Fetch Priority sets how it is ranked. If a preload already sits early in the <head>, high might not improve LCP significantly. And it is a hint, not a directive, so the browser can still decide otherwise.

Remote images, placeholders and quality

Remote images need a remotePatterns entry in your config. A request that does not match gets a 400 Bad Request. Leaving out protocol, port, pathname or search implies **, which the docs call not recommended, so be specific. Remote images also need width and height set by hand, because Next.js cannot read them at build time.

Placeholders work the same way. placeholder="blur" needs a blurDataURL, which Next.js adds on its own for static imports of jpg, png, webp or avif. For remote or dynamic images you supply it yourself, and the docs recommend 10px or less because it is enlarged and blurred.

quality is an integer from 1 to 100 and defaults to 75. From Next.js 16 the qualities config is required and defaults to [75], so a value outside the list is coerced to the closest allowed entry. If your images go through a CDN as well, see how the Next.js caching layers interact with the optimized files.

Check that the fix worked

Start with the basics: confirm the LCP image is not lazy-loaded, that its sizes value matches the rendered width, and that it carries real width and height values. Those three checks catch most slow hero images before you reach for anything more advanced.

Run Lighthouse or the Chrome DevTools performance panel on the page and look at which element is reported as LCP. The docs note that it can be right to have more than one preloaded image when different images are the LCP element at different viewport sizes, so test mobile and desktop widths separately.

A lab run only confirms the change. Judge it against real users, and read our guide on field data and lab data before you decide which number to trust.

Conclusion

Declare the real intrinsic size, write a sizes value that matches the layout, and mark only the LCP image for early loading: preload for a single known image, loading="eager" with fetchPriority="high" otherwise. Then measure with real-user data. If you want a second pair of eyes on a slow template, our web development team works on this kind of problem.

Frequently asked questions

Is the priority prop removed in Next.js 16?

It is deprecated, not removed. The Next.js docs say that starting with Next.js 16 you should use preload to keep the same preloading behavior, or loading="eager" if you only need to turn off lazy loading.

What happens if I leave out sizes?

The browser assumes the image is as wide as the viewport (100vw), so it may download a larger file than the layout needs. With sizes, Next.js generates a full srcset.

Does fetchPriority="high" stop lazy loading?

No. The Next.js docs say fetchPriority alone does not disable lazy loading, so pair it with loading="eager" for an above-the-fold image.

What is a good LCP?

web.dev says to aim for 2.5 seconds or less at the 75th percentile of page loads, segmented across mobile and desktop. Above 4.0 seconds is poor.

Brauchen Sie so etwas für Ihr Unternehmen?

Erzählen Sie uns, was Ihnen vorschwebt, auch wenn es noch grob ist. Innerhalb von zwei Werktagen erhalten Sie eine kostenlose Durchsicht per E-Mail.

  • Antwort innerhalb von zwei Werktagen
  • NDA auf Wunsch
  • Kostenlose Durchsicht per E-Mail
intake.form
Alle Felder erforderlich