Upvote:1

Aprove answer

The image isn't in background, so the back properties aren't necessary.

Instead, try object-fit: cover; (https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit)

And to be alright semantically speaking, consider replacing div by figure


Credit Goes to: stackoverflow.com

Related question with same questions but different answers