5 ms·
Use svg instead of that PNG and dataset not set/getattribute and you are down to 400
by phillipseamore 7y ago
Use svg instead of that PNG and dataset not set/getattribute and you are down to 400
- l1am0 7y agoAwesome. Thanks!
- l1am0 7y agoWhen 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 http://www.w3.org/2000/svg"><style>svg{background: grey;}</style></svg>`
- phillipseamore 7y agoDo something like: data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' 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.
- l1am0 7y agoNice. It works now :D