An error about CORS of Image.
See original GitHub issueWhen I update the last version PIXI in github dev branch, my demo can’t run. There is an error message about load image:
Access to Image at ‘file:///Users/rocky/DEV/www/test-pixi/client/test-mesh/required/assets/displacement_BG.jpg’ from origin ‘null’ has been blocked by CORS policy: Invalid response. Origin ‘null’ is therefore not allowed access.
I use chrome and with the args : --args --allow-file-access-from-files -enable-webgl --ignore-gpu-blacklist
.
There is no problem in the version at commit 07eb79c4e4edb1cc4f52b7105e54ddd77868acdf
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Dealing with image CORS error in Chrome, Chromium and ...
The issue comes from the way that Chromium caches the images. The way that the initial image is cached is - without the...
Read more >Why does the editor throw a CORS error when processing an ...
The most likely cause of CORS errors is an incorrectly configured CORS policy on a remote server. A resource is deemed remote when...
Read more >Allowing cross-origin use of images and canvas - HTML
HTML provides a crossorigin attribute for images that, in combination with an appropriate CORS header, allows images defined by the <img> ...
Read more >Html <img src=...> works but JS Image loading cause CORS ...
I try to found solution my self (JS ES6) but find only-partially. We are able to load img from no-CORS support src into...
Read more >Error cors · Issue #390 · tsayen/dom-to-image - GitHub
Hi guys I'm trying to generate the image of a tage img from my screen, but I'm having color problems, does anyone have...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As you can see in the error message the browser is blocking the image load because it is missing cross origin headers. The loader determined that the image was crossOrigin and set the value for you. You can either 1) Update the server to send the correct CORS headers so that you can do a crossOrigin load or 2) Change your
crossOrigin
param to empty string, which will “work” but will dirty the canvas and restrict you from performing certain potentially insecure actions (like reading pixels). Example of options 2: https://jsfiddle.net/vkww63ao/2/Oh! It’s chrome’s bug. The last dev version has fixed it .