Replies: 10 comments 10 replies
-
|
how did you resolve the issue? |
Beta Was this translation helpful? Give feedback.
-
|
@spirobel I have not solved it and the next.js team does not answer. They are extremely ignorant of the community. But since it's a trend that everyone uses we're using it too. We literally have to. |
Beta Was this translation helpful? Give feedback.
-
|
<Image className="w-full h-auto" src={data.imageUrl} width={x} height={y} /> |
Beta Was this translation helpful? Give feedback.
-
|
@SukkaW the |
Beta Was this translation helpful? Give feedback.
-
|
Also where is this documented --- none of this helps an early or new adopter of nextjs... smh |
Beta Was this translation helpful? Give feedback.
-
I found myself in a similar situation |
Beta Was this translation helpful? Give feedback.
-
|
Hi guys, I've come across this issue thread and it seems that I'm experiencing a problem quite similar to the one you've described here. I've searched through the existing discussions and documentation, but I haven't found a concrete answer or workaround yet. In my case, the issue occurs when add < Image /> component inside div with style relative applied to it and do other style using tailwind. I have tried to specify fill and specify size, but unfortunately, the problem persists. I wanted to check in with you to see if you've found a solution or workaround for this issue since your last update here. Any guidance or suggestions you may have would be greatly appreciated. If you need any further information or clarification about my specific scenario, please feel free to ask. Looking forward to your response and hoping for a resolution soon. Thanks in advance for your help! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
It is quite disappointed to see that a basic component like There should be a good, robust solution provided before throwing warnings to engineers: |
Beta Was this translation helpful? Give feedback.
-
|
For anyone still dealing with this, I built a library called // ❌ Before:
<Image
src="/avatar.webp"
sizes="(min-width: 1024px) 120px, 100px"
className="size-25 lg:size-30"
/>
// ✅ After:
<SmartImage src="/avatar.webp" className="size-25 lg:size-30" />
// will auto-generate this → sizes="(min-width: 1024px) 120px, 100px"It wraps
|
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Next.js Image is extremely difficult to work with. Either the old one or the new one. It's our entire team's opinion.
However, because of the optimizations it has, we still want to work with it.
We use Tailwind CSS to design our products.
Here's a sample code:
As you can see, we specify width and height using the Tailwind system. But for
<Imagecomponent, we only have one required width or height.This causes problems. Because as we increase the screen's size, the container becomes bigger, but the image stays the same in size.
What can we do to solve this issue? How do you use Nextjs future image with Tailwind?
Beta Was this translation helpful? Give feedback.
All reactions