Maintain image aspect ratio in nested flexbox container on IE11 Maintain image aspect ratio in nested flexbox container on IE11 google-chrome google-chrome

Maintain image aspect ratio in nested flexbox container on IE11


It looks like adding min-height: 1px; to the img is the solution. I wish I had a good explanation for why this works. Here's the best I could find:

... My best guess is that the min-height forces IE to recalculate the height of the rendered content after all of the resizing, and that makes it realize that the height is different....


Fellow stranger looking for fix, but featured on top answer didn't help.Setting min-width: 1px; to the img may help you as well.