JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<img src="https://images.unsplash.com/photo-1658223255517-6a0b475fdd7f?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1740&q=80" alt="">
</div>
CSS
div {
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}