The cover image format resizes an image down (or optionally up) to the smallest
size that completely covers the specified height and width while maintaining
ratio.

https://www.drupal.org/project/image_format_cover