.class { object-fit: contain; } .class { object-position: 20px; }