That’s what I did basically the problem is the creation of the Image itself and loading from the webworker context. Image is a DOM type in typescript that I cannot access, also even if I add DOM to my libs in tsconfig, the load still fails.
This is how would I proceed if I needed to stuck with loading the data in the WebWorker:
Load the image using fetch into a blob in the WebWorker.
Send the blob data back to the main thread via postMessage.
Create the Image in the main thread using the received data.
Or I would choose a totaly different approach to solve my problem.