Closed mikeott closed 1 year ago
There are multiple issues describing this. Just search for "twice". ;)
@dkern Props - and I feel stupid for not checking that first. Feel free to delete this as you are correct the issue has been well documented already.
While looking at the Network tab of the element inspector, as images with the 'lazy' class come into view they each get loaded twice. Replicated in latest versions of Chrome and Firefox.
I've confirmed this happens with jpg images as well.
My js:
Reducing it to just this...
...doesn't change anything.
We've been using this script without any drama for a long time, and this is the first time I've seen this behaviour.