Give an image a fixed width and height in CSS, and a photo with another shape gets squashed. That is the default, fill, which stretches the image to the box. Usually you want something else.
.card img {
width: 100%;
height: 200px;
object-fit: cover;
}
cover keeps the aspect ratio and fills the whole box; whatever sticks out is clipped. contain keeps the ratio and fits the whole image inside, with empty space on two sides. The other values are none (no resizing) and scale-down, which picks whichever of none and contain gives the smaller image.
With cover, the image is centred by default, so the crop takes equal parts off both sides. For a portrait where the face sits near the top, move the focus with object-position:
.card img {
object-fit: cover;
object-position: 50% 20%;
}
The default there is 50% 50%; keywords such as top and lengths work too.
I’d use this for every grid of cards with photos of mixed sizes. It beats cropping every image by hand.
Caveats. It works on replaced elements such as img and video, and MDN says it has no effect on iframe and embed. The full image is still downloaded, so a 4000-pixel photo in a 200-pixel box is still a 4000-pixel download. Serve sensible sizes as well. Support is not a concern: MDN marks it widely available since January 2020.
Further reading: MDN: object-fit, MDN: object-position