I have an image inside a container:

```css
.img-container {
  max-height: 100px;
}

img {
  width: 100%;
  max-width: 100%;
}
```

```html
<div class="img-container">
  <img src="https://vignette.wikia.nocookie.net/mrmen/images/5/52/Small.gif/revision/latest?cb=20100731114437">
</div>
```

But the image does not respect the max height of it's parent. How can I achieve this?

I cannot set height to 100% on the image as it will bork the aspect ratio.