<!DOCTYPE html>
<html>
<style>
    #flexContainer {
        display: flex;
        align-items: stretch;
        height: 300px;
    }

    #image {
        flex-basis: content;
    }

    #image2 {
        flex-basis: content;
    }
</style>
<body>
<div id="flexContainer">
    <img id="image" src="green200x140.png">
    <img id="image2" src="red50x80.png">
</div>
</body>
</html>