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 · 1 comment · 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 · 1 comment · 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
@jan-ale
Copy link

jan-ale commented Aug 10, 2024

only if the cross-origin site gives cors headers. there's an article about it

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.

2 participants