0

I am working on a shopify app that will be used to customize the products, I am using fabric.js to manipulate different canvas objects and at the end, what I want is to export the customized image from the canvas.

But the issue that I'm facing is that when I use canvas.toDataURL("image/jpeg"), it gives me this error:

SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.

I'm looking for some help regarding this, any sort of helpful input is appreciated.

Regards

Muhammad Saud
  • 356
  • 3
  • 13

1 Answers1

0

Seems pretty clear you're running into a security problem. Without you explaining more on your setup, its all a guess but it took 2 seconds to find this: canvas.toDataURL() SecurityError

Community
  • 1
  • 1
David Lazar
  • 10,865
  • 3
  • 25
  • 38