I would want to make 2 images with different widths, displayed the same height side-by-side, ideally in a flex box.
The following works if I know the image dimensions (962x706 and 962x1275).
Is there a way to do this without knowing their dimensions?
<div style="display: flex; margin: 0 -5px">
<div style="flex: calc(962/706); margin: 0 5px">
<img src="https://i.stack.imgur.com/H7QKE.jpg"/>
</div>
<div style="flex: calc(962/1275); margin: 0 5px">
<img src="https://i.stack.imgur.com/nsyuX.jpg"/>
</div>
</div>
img {
width: 100%;
}
A fiddle for convenience https://jsfiddle.net/b1f6v3kc/