Skip to content

Commit aeb079d

Browse files
authored
Merge pull request #77 from usetrio/fix/FixImageCORS
fix: Support CORS for image
2 parents 1153a88 + 285e017 commit aeb079d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/SketchField.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ class SketchField extends PureComponent {
543543
})
544544
}
545545
let img = new Image();
546+
img.setAttribute('crossOrigin', 'anonymous');
546547
img.onload = () => canvas.setBackgroundImage(new fabric.Image(img),
547548
() => canvas.renderAll(), options);
548549
img.src = dataUrl

0 commit comments

Comments
 (0)