DEV Community

Discussion on: How to Resize Uneven Sized Images without breaking their Aspect Ratio

Collapse
hugekontrast profile image
Ashish Khare😎

How about?
Width:200px;
Height:auto;

Collapse
shafiemoji profile image
Shafi Author • Edited

If we use height: auto; instead of a fixed height, we'd keep the aspect ratio but all of the images would have different height like so i.imgur.com/hGdhivc.png