Closed stereobooster closed 1 year ago
You might try <img crossorigin="anonymous">
in the markup (as in the example)
or image.setAttribute('crossOrigin', 'anonymous')
on the Image
object before loading the image from the remote server.
This article presents a more in-depth explanation: https://inspirnathan.com/posts/105-fix-tainted-canvas-from-cross-origin-error/
Hey 👋
First of all thank you for this library.
I probably poorly worded bug report. The problem is that this promise rejection isn't handled. I would expect detect
function to reject with this error. I can make a PR to fix (I didn't check code, but it should be easy to find)
Ahh... I understand now what you meant, and I have fixed detect()
to return a rejected Promise
in error cases.
I got this error in Chrome for image from remote server