DEV Community

Mayank
Mayank

Posted on

Answer: srcSet in Image component is not working and it is not displaying right image in next js

Checkout this API reference - https://nextjs.org/docs/pages/api-reference/components/image

Next.js Image component does not support passing srcSet like how you are trying to do. You can handle this using JavaScript, e.g., using a custom loader function or storing the image URL in a state variable.

Top comments (0)