IonicPopup included Img

Hi all,
I’ve got a quite simple question but anyhow I am not able to find any solution for that.
I have an IonicPopup which includes a picture. This picture in the popup should be automatically resize depending on the screen size. This is working with:

.popup .popup-body img{
max-width: 100%;}

My problem is now that this is working for the max-width setting but it isn’t working with the max-height setting.
Has anyone a quick solution if not I can also creade a codepen.