Closed EnderGnar closed 11 months ago
Hi @EnderGnar,
The solution to a full-with image without a specified width value is to use the fill property.
A boolean that causes the image to fill the parent element, which is useful when the width and height are unknown. The parent element must assign position: "relative", position: "fixed", or position: "absolute" style.
Then you can give the parent a width:100% or whatever may be suitable in the specific situation.
Your quoted solution seem like a hack that should not be encouraged.
Oh wow sorry should have just searched a little bit further in that thread.
Thank you :)
There is a new pattern needed when using an
<Image>
with non pixel defined width. It would look something like this:from https://github.com/vercel/next.js/discussions/18474#discussioncomment-5501724.
In debug mode this does not work because width is not defined, maybe some undefined checks that are a little to weak.