Center and crop images with a single line of #CSS — Medium
▻https://medium.com/@chrisnager/center-and-crop-images-with-a-single-line-of-css-ad140d5b4a87
It’s simple. Set your image crop dimensions and use this line in your CSS:
img {
object-fit: cover;
}