How can I preload images efficiently in Next.js? #85979
Answered
by
nianod
c-odecommander
asked this question in
Help
-
Beta Was this translation helpful? Give feedback.
Answered by
nianod
Nov 10, 2025
Replies: 1 comment
-
|
You can improve image loading by using the priority prop only for above-the-fold images and enabling Next.js Image Optimization in next.config.js. import Image from "next/image";
export default function Hero() {
return (
<Image
src="/hero.png"
alt="Hero image"
width={1200}
height={800}
priority
/>
);
}Also, double-check that your images are served from the Next.js image loader, not statically via /public. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
c-odecommander
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can improve image loading by using the priority prop only for above-the-fold images and enabling Next.js Image Optimization in next.config.js.
Also, double-check that your images are served from the Next.js image loader, not statically via /public.
That usually fixes the LCP issue.