canonical / snapcraft.io

The official website's repository for the Snap store
https://snapcraft.io/
Other
144 stars 107 forks source link

When store has backfilled image sizes remove complicated image_template implementation #2920

Open Lukewh opened 4 years ago

Lukewh commented 4 years ago

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).

nottrobin commented 4 years ago

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.