I saw this question about flexbox stretching images vertically, and applying align-self: center fixes it: Why does flexbox stretch my image?
However, I have an issues with my images stretched horizontally: https://jsfiddle.net/qnnpxskk/
HTML:
<div class="wrapper">
<div class="inner">
<div class="row">
<img src="https://www.wired.com/wp-content/uploads/2015/11/google-tensor-flow-logo-F.jpg">
</div>
<div class="row">
<img src="https://www.wired.com/wp-content/uploads/2015/11/google-tensor-flow-logo-F.jpg">
</div>
</div>
</div>
CSS:
.wrapper{
width: 600px;
height: 900px;
background: white;
}
.inner{
display: flex;
flex-direction: column;
}
.row{
max-height: 100px;
margin: 20px;
display: flex;
flex-direction: row;
background: red;
}
.row img{
max-height: 100%;
}
Everything I try I can't seem to get the image to not be stretched. I want the image to be 100% height of the parent and the width to maintain aspect ratio of the original.