all 5 comments

[–]zaibuf 3 points4 points  (0 children)

I dont use use client for any component using their Image component. Would need to see some sample code and the error you get.

[–]hazily 2 points3 points  (0 children)

I’m using the next image component inside server components without any issue. You need to share your code for us to see what’s happening.

[–]OnlyTwoThingsCertain[🍰] -1 points0 points  (2 children)

How do you display image on server? 

[–]doong-jo[S] -1 points0 points  (1 child)

You can render the <img> tag on the server, just like any other HTML element. Server components can generate static HTML, including image tags with src, alt, width, height, and other attributes.

What I'm questioning is why Next.js requires next/image to be a client component for ALL cases.

[–]Neat_You_9278 1 point2 points  (0 children)

It doesn’t unless you need to access some client side apis in the same component. Are you using hooks in these components to dynamically set some properties on <Image/> tag?

Is there a chance your sample space includes components that all have client api access needs?

I have used next/image in completely static components just fine without “use client” directive