Indeed, utilizing flexbox can achieve that design
Below is the code with explanations
div{
width:300px;
height:300px;
overflow:hidden;
position:relative;
left:50%;
transform:translateX(-50%);
display:flex;
justify-content:center;
align-items:center;
}
div img{
flex:0;
width:auto;
min-height:100%;}
<div>
<img src ="http://www.cooperindustries.com/content/dam/public/safety/notification/products/Mass%20Notification%20Systems/Spotlight/MNS_WideArea_Spotlight3.jpg">
</div>
You can use flex-start, flex-end, and center in justify-content to align horizontally.
For align-items, you can adjust vertically using the same values as justify-content.
Since the image is landscape, I set min-height to 100% and width to auto. Adjust accordingly for portrait or square images.