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.
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 (https://stackoverflow.com/questions/20424279/canvas-todataurl-securityerror)
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.