Re:Firefox 66.0 Aims to Reduce Online Annoyances
by megous on Tuesday March 19, 2019 @11:01AM
(#19431407)
Not sure why you're downvoted. It's a real problem. It would help if it would be possible to set an aspect ratio on the img tag, so that when it's scaled via CSS or whatever, it would maintain the aspect ratio of the loaded image despite it not being loaded yet.
[ Parent
| on HN ]
Re:Firefox 66.0 Aims to Reduce Online Annoyances
by vbernat on Tuesday March 19, 2019 @01:31PM
(#19433153)
It's possible and well-known: https://css-tricks.com/aspect-ratio-boxes/. Also, for images, there is the simpler solution of specifying real width/height in the img tag, then use CSS with "max-width: 100%; height: auto" or anything similar.
Re:Firefox 66.0 Aims to Reduce Online Annoyances
by megous on Tuesday March 19, 2019 @07:08PM
(#19437088)
It doesn't work in chrome. Try (test.png doesn't exist):
<img width="100" height="100" style="width:100%;height:auto;" src=test.png>
and you'll get 16x16px placeholder image. In Firefox, it works.