I have several images with different sizes within a row. The images should be sized automatically to fill the available space while keeping their aspect ratio.
If possible, their actual visual size should be in relation to their original size. With that I mean: A large image should be larger in the scaled version as a smaller image.
.Container {
width: 100%;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
flex: 1 1 auto;
}
img {
max-width: 100%;
}
<div class="Container">
<img src="https://klotzen-statt-kleckern.de/tmp/logo.png">
<img src="https://klotzen-statt-kleckern.de/tmp/logo.png">
<img src="https://klotzen-statt-kleckern.de/tmp/logo-g.png">
<img src="https://klotzen-statt-kleckern.de/tmp/logo-g.png">
<img src="https://klotzen-statt-kleckern.de/tmp/logo.png">
<img src="https://klotzen-statt-kleckern.de/tmp/logo.png">
<img src="https://klotzen-statt-kleckern.de/tmp/logo-g.png">
<img src="https://klotzen-statt-kleckern.de/tmp/logo-g.png">
</div>
A fiddle can be found here: http://jsfiddle.net/ej5au8os/
In Firefox 62 I get the result I want.
Chrome and Edge simply doesn't seem to scale the images at all.
What am I missing?