diff --git a/ts/components/MediaEditor.dom.tsx b/ts/components/MediaEditor.dom.tsx index 26c3868185..adb4ce4ae0 100644 --- a/ts/components/MediaEditor.dom.tsx +++ b/ts/components/MediaEditor.dom.tsx @@ -338,6 +338,7 @@ export function MediaEditor({ } const img = new Image(); + img.crossOrigin = 'anonymous'; img.onload = () => { setImage(img); diff --git a/ts/util/avatarDataToBytes.dom.ts b/ts/util/avatarDataToBytes.dom.ts index 4612f9920b..b42d4d0913 100644 --- a/ts/util/avatarDataToBytes.dom.ts +++ b/ts/util/avatarDataToBytes.dom.ts @@ -32,6 +32,7 @@ async function drawImage( canvas: HTMLCanvasElement ): Promise { const image = new Image(); + image.crossOrigin = 'anonymous'; image.src = src; await image.decode(); // oxlint-disable-next-line no-param-reassign