- Affected version
- 2.2.3
PageSpeed Insights
![developers.google.com](/community/proxy.php?image=https%3A%2F%2Fwww.gstatic.com%2Fpagespeed%2Finsights%2Fui%2Flogo%2Ffavicon_48.png&hash=7d1d15f37339dfdd42b44a75a574bd42&return_error=1)
PageSpeed Insights
![developers.google.com](/community/proxy.php?image=https%3A%2F%2Fwww.gstatic.com%2Fpagespeed%2Finsights%2Fui%2Flogo%2Ffavicon_48.png&hash=7d1d15f37339dfdd42b44a75a574bd42&return_error=1)
This might be caused by flexbox not being able to detetmine the height early enough; adding
height
and max-height
CSS rules on div.media-container
seems to fix this for me:
Code:
<xf:if is="$mediaItem.media_type === 'image'">
<xf:css>
div.media-container
{
height: {$mediaItem.Attachment.Data.width}px;
max-height: 80vh;
}
</xf:css>
</xf:if>