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

webgl-image-processing: images don't actually have to be same-origin #433

Open
okyanusoz opened this issue Aug 11, 2023 · 0 comments · May be fixed by #434
Open

webgl-image-processing: images don't actually have to be same-origin #433

okyanusoz opened this issue Aug 11, 2023 · 0 comments · May be fixed by #434

Comments

@okyanusoz
Copy link

Here:
var image = new Image();
image.src = "https://webglfundamentals.org/webgl/resources/leaves.jpg"; // MUST BE SAME DOMAIN!!!

This is incorrect. You can use:
var image = new Image();
image.crossOrigin = "*" // or crossOrigin = "anonymous"
image.src = "https://picsum.photos/300/500"; // try it, this works!

The only caveat is that credentials are omitted, but I think that's acceptable.

@okyanusoz okyanusoz linked a pull request Aug 11, 2023 that will close this issue
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 a pull request may close this issue.

1 participant