Skip to content

Conversation

@mbrevda
Copy link
Owner

@mbrevda mbrevda commented Oct 5, 2023

When the component is unmounted, attempt to cancel the image download. When using native <img /> tags, the browser does this by default. In order to test if the image is available to be displayed, we use the js Image() API and we need to tell it to stop downloading manually.

Fixes #290 by automatically canceling the download on unmount.

A preview build is available here for testing: https://github.com/mbrevda/react-image/suites/16914291077/artifacts/966242176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Downloads of unmounted images aren't canceled

2 participants