object-fit
The CSS object-fit property is used to define how content of a replaced element (e.g., a video or an image) is made to fit the dimensions of its containing box.
This property can take following values:
object-fit: fill | contain | cover | none | scale-down;
img {
object-fit: cover;
}