Lines 9-34 need to be reviewed. The top section is what should be used. The else catches any image that comes from the store that doesn't have a width and height defined (and can potentially create larger than required images).
Image template module has now been updates so that it could be used in this scenario I think - it now only requires a width, `height is optional. I think this means this code can now be made much tidier.
https://github.com/canonical-web-and-design/snapcraft.io/blob/master/templates/partials/_snap-screenshot.html
Lines 9-34 need to be reviewed. The top section is what should be used. The else catches any image that comes from the store that doesn't have a width and height defined (and can potentially create larger than required images).