Avatars that never squash
CaveatThe default is fill, which is why the left face is squashed: a wide photo forced into a square stretches. cover crops instead — but it crops from the centre, so a face near the edge of the photo needs object-position to stay in frame. And the box must have both dimensions: with only a width the height follows the image and there is nothing to crop against.
FallbackWhere it is unsupported you get the stretched version on the left — ugly, but present and labelled. Never fake cover with background-image on a div: that throws away the alt text.
.avatar {
width: 64px;
/* both, or there is nothing to crop */
height: 64px;
object-fit: cover;
/* when the face is not centred */
object-position: 50% 20%;
}