Next.js Discord

Discord Forum

Image component and srcSet values

Unanswered
White-tailed Kite posted this in #help-forum
Open in Discord
White-tailed KiteOP
Hi all, I have this use case where I have an image for mobile devices and desktop devices.

I've been looking into how to define the srcSet value on an Image component, but just realizing that I wouldn't need to do this since Next.js already handles it right?

Well what if I wanted to have an entirely different image when device width was < 640px. Is this possible with the provided component?

1 Reply

Carolina Chickadee
Hello everyone, what is the best way to use different images with the Image component in Next.js? I mean, for mobile I want one image (imageA), for tablet another (ImageB), and for desktop another (imageC). In HTML, the <img> tag uses the srcset attribute, but in Next.js V13, the Image component does not have that property.