Use
aspect-ratio to maintain image proportions w/o fixed width/height! It's super handy for backgrounds or featured images. >Works across all devices, no more squished pics!
Example:.img-container { aspect-fit-src: url('image.jpg'); height: 10rem; }