From cc2c707a060deee07b59d0aae5dbff4416c638f3 Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Fri, 8 May 2026 11:14:30 -0500 Subject: [PATCH] Fix image editing in MediaEditor Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com> --- ts/components/MediaEditor.dom.tsx | 1 + ts/util/avatarDataToBytes.dom.ts | 1 + 2 files changed, 2 insertions(+) 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