Please add any browser-specific quirks you come across.
This behavior appears because of a browser synchronization issue between the src change to the proxy image and the original one back again: The thing is that the change to the proxy src may be performed 'fast enough' that it already triggers the
loadevent once, which is then triggered again during the second change. Even if we check for src!=blank in load, as in @paulirish's last revision, it is possible that the second src change will be triggered between just after the first src assignment and the triggering of the load event, leaving us no control whatsoever over when to trigger the callback!
lenvariable goes below 0 and the callback is called more than once. This is the reason for the gaps seen in @Apfelstrudel's example: Because of ImagesLoaded, Isotope is forced to re-append the same content more than once, leaving the previous element positions blank.
I had to add
setTimeout because Google Chrome was return 0 width and height for images, even though they were loaded and had dimension.
@ajpiano kicked this all off in 2009
Last edited by desandro,