desandro / imagesloaded

:camera: JavaScript is all like "You images done yet or what?"

Home Page:https://imagesloaded.desandro.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work when setting the src

Gruski opened this issue · comments

Event triggers on initial render but not if subsequently the src is set multiple times through javascript to new URL. I would expect it to trigger the event every time the src is changed.

I would expect it to trigger the event every time the src is changed.

Sorry! This is not how imagesLoaded was designed to work. You can build your own solution to track that sort of change, listening for load or error event.

On load is not reliable for cached images and error event is not appropriate if there is no error. That's the whole reason we needed an imagesloaded library to begin with. So neither are a good solution. Hope you can add this ability since the library seems incomplete without it.