Skip to content
Discussion options

You must be logged in to vote

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.
That usually fixes the LCP issue.

Replies: 1 comment

Comment options

You must be logged in to vote
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
Category
Help
Labels
None yet
2 participants