<img src="https://miro.medium.com/max/10368/1*NTtQYy-UFmph2MVCKvqvpA.jpeg" alt="">
  <figcaption>Scale the viewport to resize the image</figcaption>

body {
  display: grid;
  place-items: center;
  margin: 0;
  min-height: 100vh;
  background-color: #04142F;
  text-align: center;
  color: #efefef;
  font-size: 1.2rem;

img {
  width: 70vw;
  height: 70vh;
  border: solid 1px #013BC2;
  Object-fit: cover;
  Will crop the image to fit withing it's bounds.
  Scale the viewport to feel the magic. :p
  object-fit: cover;

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.