Re:Show HN: The smallest and most narcissistic image lazyloa...
by phillipseamore on Wednesday December 18, 2019 @04:38PM
(#21829743)
Use svg instead of that PNG and dataset not set/getattribute and you are down to 400
[ Parent
| on HN ]
Re:Show HN: The smallest and most narcissistic image lazyloa...
by l1am0 on Wednesday December 18, 2019 @05:40PM
(#21830228)
When I use the svg in the img src, the image is higher as the original and thereby the size changes on lazy loading. Do you have a clue why? Used svg:
`data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><style>svg{background: grey;}</style></svg>`
Re:Show HN: The smallest and most narcissistic image lazyloa...
by phillipseamore on Thursday December 19, 2019 @01:16AM
(#21832432)
Do something like:
data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1' />
And don't bother with the color there, just set a background-color on all IMG elements in CSS, the svg will be transparent.