Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the issue
getSize
implementation is more complicated than should be. There are intervals involved which, in some conditions, can keep running "forever". I have stumbled upon this issue, when I used getSize
in some jest tests. The problem occurs, when an image fails to decode and naturalWidth
, naturalHeight
are 0
.
Expected behavior
- No potential for infinite timers.
failure
callback is called when an image fails to decode.
Steps to reproduce
Unit tests will be provided in a merge request
Test case
Unit tests will be provided in a merge request
Additional comments
No response