SyntaxFix
Write A Post
Hire A Developer
Questions
I believe this is the best way of doing it, I've tried it and it works very well.
#img { object-fit: cover; }
This is where I found it. Good luck!