<Image /> component nightmare...
Answered
Pacific anchoveta posted this in #help-forum
Pacific anchovetaOP
Hi, everybody.
I have a hard time getting the
I want to restrict the heigh of an image to 40px, as I'm using it in a table row. Also, I need it to be
I tried to wrap the
Could anyone give me a hint?
I have a hard time getting the
Image component working as intended. I want to restrict the heigh of an image to 40px, as I'm using it in a table row. Also, I need it to be
object-fit: cover as I don't want it to be "skewed". I tried to wrap the
Image in a div with height: 40px, and then set fill and then style: {{object-fit: cover}}, but it does not work. Could anyone give me a hint?
Answered by Pacific anchoveta
Problem solved by adding
relative + height to the parent div.4 Replies
Pacific anchovetaOP
Cape horse mackerel
Have you tried to add
height={40} to the Image?Pacific anchovetaOP
Problem solved by adding
relative + height to the parent div.Answer