imgix / ember-cli-imgix

Easily add imgix functionality to your Ember application
https://imgix.github.io/ember-cli-imgix
MIT License
26 stars 13 forks source link

onLoad handler not called when new state passed, but src unchanged #59

Closed Duder-onomy closed 2 years ago

Duder-onomy commented 6 years ago

When a img's src does not change the load event is not called. This is by design as in fact, nothing has loaded. We want to see the loaded event after we have passed new state to imgix-image and after the browser loads the image (whether from cache or from network). We are not trying to express a dependency on an images download, only a dependency on when the browser thinks the image is ready.

Here is a branch that fixes ^ https://github.com/Duder-onomy/ember-cli-imgix/tree/hotfix-image-loaded-from-cache-does-not-fire-on-load

Going to hold off on the full PR until the 'srcset' changes have landed and stabilized.

sherwinski commented 2 years ago

Closing as this issue is quite old - but we're happy to reopen if there is still a need for this at some point in the future.