Problem reading RGB data from image online

URL of experiment:

Description of the problem:

I try to use the HTML canvas functionality with getImageData() method to read RGB data from image.
In index.html I add:

<canvas class="myCanvas"></canvas>

in main javascript file:

const canvas = document.querySelector('.myCanvas'); // 
const width = canvas.width = 1920; // window.innerWidth;
const height = canvas.height = 1080; // window.innerHeight;
const ctx = canvas.getContext('2d');		

  
let image = new Image(1920, 1080);
image.src = 'wheel_v7s9_fullsize.png';
image.onload = function() {
ctx.drawImage(image, 0, 0);
}
imageData = ctx.getImageData(0, 0, ctx.canvas.width, ctx.canvas.height)```

It doesn’t work for some reason. What I receive is undefined RGB value (you can see it in console and in alert message), no matter where I click on the image.

Probably, the problem is that “…for security reasons, getImageData is disabled if you have drawn an image originating on a different domain than the web page itself.”
But isn’t it enough that I upload the image to the ‘resources’ folder in Pavlovia/GitLab?

Attached above the url to the super-short code version with a "color reading’ routine from my exp.
I’ll be very grateful if somebody can show me where I’m wrong and avise about how to continue.

Thanks in advance and
happy holidays to all! :christmas_tree::t_rex:

Hey again!

Just checking. This issue is being covered over here right? Pixel color reading procedure in online experiment

Yes, thanks, I am gonna delete this message

Bueno. Thnx!