Skip to content
Discussion options

You must be logged in to vote

To lower the LCP (Largest Contentful Paint) when using next/image with an SVG, you need to prioritize loading and reduce render delay.

Example:
product

What to improve:

  1. Add priority
  • This tells Next.js to preload the image
  • Important if this image is above-the-fold (visible on first load)
  1. Use correct sizing
  • Your width/height is 1000 but you display it at ~200–330px
  • Set more realistic dimensions to reduce layout cost:

width={330}
height={330}

  1. Consider removing next/image for SVG
  • SVGs are vector and don’t need optimization
  • Using a normal or inline SVG is often faster:

OR inline it directly inside JSX for best performance

  1. Avoid large CSS resizing
  • You are shrinking 1000px → ~300px vi…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lorenz-reelist8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Ask and answer questions about GitHub features and usage Programming Help Discussions around programming languages, open source and software development Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community! source:ui Discussions created via Community GitHub templates
2 participants