<img class="img" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/14179/object-fit.jpg"> 

<img class="cover" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/14179/object-fit2.jpg"> 
img {
  float: left;
  width: 50%;
  height: 100vh;
  object-fit: cover;
}

.cover {
    object-fit: cover;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.