I think what you are looking for might be this: Available on MDN web docs
On changing the height and width, you can decide what works for you! However as you described, object-fit: fill; seems the most suitable for your case