Open magician11 opened 2 years ago
Maybe it's too late for @magician11, but useful for other users.
You can try to set the crossOrigin
property to anonymous
.
<AvatarEditor
ref={setEditorRef}
image={imageFile}
width={editorDimenson}
height={editorDimenson}
border={8}
color={[0, 0, 0, 0.8]}
scale={scale}
rotate={0}
crossOrigin={'anonymous'}
/>
I have a component that looks like this...
Basically clicking "Update" and triggering the
saveImage()
function, results in this security error. In Firefox I get the above error "The operation is insecure". In Chrome I get a slightly more detailed message which says "Tainted canvases may not be exported."Specifically it's from the line where
canvas.toBlob
is called.I can see from the docs https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob a reference to this error. I'm just not sure how to fix it.