Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS error when loading images from external urls #406

Open
parth-pindiwala-us opened this issue Nov 7, 2023 · 1 comment
Open

CORS error when loading images from external urls #406

parth-pindiwala-us opened this issue Nov 7, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@parth-pindiwala-us
Copy link

I am still facing the issue.

Screenshot from 2023-09-07 18-37-24

If I use noCrossOrigin then the image is loaded but I get this error.
Konva error: Unable to apply filter. Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data. This post may help you https://konvajs.org/docs/posts/Tainted_Canvas.html.

As there already one issue is register but it is closed below is issue link.
#319

@AhmeeedMostafa
Copy link
Collaborator

Hello @parth-pindiwala-us , as mentioned in the same Issue #319,

it is not advisable to use noCrossOrigin cause it might cause such an error u receive in some cases,
so it is recommended for you to set the cross-origin policy on your server and avoid using noCrossOrigin property

also, another option that might work (not sure) is to load the image from ur side and provide it as an HTML element (as mentioned in this comment #319 (comment)
or provide your own BLOB URL.

@AhmeeedMostafa AhmeeedMostafa added the help wanted Extra attention is needed label Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants