Image Containment
This shows image containment. All of these images are much bigger than the divs that they are contained in.
The landscape images are wider than they are tall (approximately 1.5:1), and the picture of the batteries is taller than it is wide (again 1.5:1, but in the opposite direction).
Using object-fit on its own is not sufficient. The fit is not based on the parent container, it has to be accompanied with the height and width to contain within. Relative width and height do work, but still must be specified.
Contain

Cover

Unconstrained (and distorted)

Contain

Contain

Cover
