Image unexpectedly resizing

I’m experiencing it right now :upside_down_face:

Amazing! This helped :slight_smile:

Make sure the parent element isn’t set to “Auto”

I was having the same issue where my image got re-sized automatically and I tried everything from setting the max-height and width to setting min-height and width but nothing really worked as expected. So I kept on trying until I landed at the solution for it. My Image was under a parent div and that div was under a parent div that has flexbox applied to it.

Now what I did was simply give the Image max and min height and width according to my need and now the important part, as the image parent was under a flexbox div, the Image parent div was a child element of the flexbox which gave me certain powers such as Do not shrink and grow

And that’s my friend is the solution, you simply have to give the image a min and max height and width and then the parent of the image Do not shrink and grow and you are good to go

Do let me know if you found this useful