object-fit is the property which handles the picture based on the available width and height. Using fill value the aspect ratio (Width:Height) will be maintained and image will not appear distorted or squeezed, it will resized so that the longest of either the height or width can fit in the given dimensions. Other values are cover, none, scale-down. A staple in advanced CSS interview questions, be prepared to answer this one.