0

I am currently coding frogger and I am working with Chrome. I keep getting an error of:

Access to Image at 'file:///C:/Users/owner/Desktop/Frog.png' from origin 'null' has been blocked by CORS policy: Invalid response. Origin 'null' is therefore not allowed access

I tried running the code in Firefox and it worked with no errors. I am using getImageData as well as image tags, which I think maybe the problem due to cross-origin data. Any fixes?

t.niese
  • 39,256
  • 9
  • 74
  • 101

1 Answers1

-2

If it's just for a personal project you can use the Chrome extension to temporarily allows CORS requests found here:

https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en

Vincent Nguyen
  • 1,555
  • 4
  • 18
  • 33