contain
will show the entire image
#img1 {
  object-fit: contain;
}
cover
will take the entire space and maintain the image aspect ratio
#img2 {
  object-fit: cover;
}
by Valeri Tandilashvili
3 years ago
CSS
properties
0
Pro tip: use ```triple backticks around text``` to write in code fences