What's happening:
If you use the inspector tool, browsers add width:auto; because no width rules are declared. I did a little research and I can’t find any reason for WHY, but this is because Chrome and Firefox have calculated “width: auto” differently. Firefox computes based on proportionality, and Chrome displays native.


I checked the CSS2.1 width specification, and since we are talking about an image that is inline, we have a lot of conditions to check. One that I think is applicable here:
Otherwise, if the "width" has the calculated value "auto", and the element has an internal width, then this internal width is the used value "Width".
Source - http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-width
If I read it correctly, it means that Chrome is technically correct, although the Firefox method looks better.
Alternative fix method:
lili2311's answer will work, but then you have to declare the width, which means that you have to use images with the same proportions. You can also remove height:``00% , which you already know. The third method would be to give a a height:100% , change max-height:220px to height:220px to figure , and then remove max-height from img . This allows you to declare 220px only once.
Code:
figure { width: 100%; height: 220px; } a { width: 100%; height:100%; display: inline-block; text-align: center; } img { height: 100%; width:auto; }
Working demo: 
source share