NextJS Responsive Image
Unanswered
Golden paper wasp posted this in #help-forum
Golden paper waspOP
Do i have to manually change height and width to be able to have a responsive Image?
9 Replies
@Golden paper wasp Do i have to manually change height and width to be able to have a responsive Image?
The height and width you use in Image props doesn't define the actual height and width of the image.
Use object-fit css property to fill the entire container or use it as you see fit
Use object-fit css property to fill the entire container or use it as you see fit
@Clown The height and width you use in Image props doesn't define the actual height and width of the image.
Use object-fit css property to fill the entire container or use it as you see fit
Golden paper waspOP
should i remove the height and width property inside image?
@Golden paper wasp should i remove the height and width property inside image?
Try using fill prop on the Image Component
Golden paper waspOP
tried object-fit:contain; on the image wrapper div but it didnt fill the whole wrapper though
You wont need the object fit or width/height
Do read that ^
@Golden paper wasp is your problem solved?
Golden paper waspOP
i haven't figured it out yet but im still studying what should i do