Closed TomS- closed 8 years ago
Thanks @TomS-
I'm not sure what it would gain when you're adding it with scripting? There is nothing that prevents you from not having any src on images and only a data-src. Blazy supports that.
Hi @dinbror
For some reason lazy loading only seems to work for me if you have "src=data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" or some sort of src image set. I don't mind setting src=data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== manually and it isn't too much of a big deal. I just thought I would fly the idea past you :-)
Could it be because your images with no src is 0x0? I always recommend saving the space for an image to avoid repaints/reflows like in my responsive example: http://dinbror.dk/blog/blazy/#Responsive
Hello,
Just a thought while using bLazy. (Great work by the way).
Would it be possible to check if a src attribute is set on an image, if not auto assign: "src=data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
Purely just an ease-of-use sort of thing really. It saves having to look it up when starting projects or keep it on the clipboard. I'm not entirely sure how elegant this is, I just know bLazy doesn't work with no src set and if I recall LazyLoadXT does this automatically which is quite useful.