In my opinion ratio shouldn't be at img.placeholder.ratio but instead promoted to img.ratio. It's a property of the original image, not just of the placeholder, and is useful even when not using the placeholder.
For example, browsers like when width and height attributes are given, since it means the page can be laid out sooner. This can be done with the ratio and a reference size:
<!-- current ratio implementation (ratio=height/width) -->
<img ... width="250" height="{{Math.round(250 * img.placeholder.ratio)}}">
<!-- ratio implementation from #16 (ratio=width/height) -->
<img ... width="250" height="{{Math.round(img.placeholder.ratio / 250)}}">
I think this should be possible even if the placeholder is not being calculated.
In my opinion
ratio
shouldn't be atimg.placeholder.ratio
but instead promoted toimg.ratio
. It's a property of the original image, not just of the placeholder, and is useful even when not using the placeholder.For example, browsers like when width and height attributes are given, since it means the page can be laid out sooner. This can be done with the ratio and a reference size:
I think this should be possible even if the placeholder is not being calculated.