Can I use object-fit contain with these values?
The calculation models cover. Contain keeps the full image visible and can leave space around it.
Center a subject or keep it near a chosen point when an image is cropped to cover a frame.
With cover, one scaled edge matches the frame and the other may be cropped. The original subject location is converted to the enlarged image coordinates.
If positioning the subject exactly would expose empty space near an edge, the position saturates at 0% or 100%. The report shows the resulting focal point in the frame.
The calculation models cover. Contain keeps the full image visible and can leave space around it.