From 73c0387e5a48af20935083febe5287d1f4b53ddd Mon Sep 17 00:00:00 2001 From: MomentQYC <62551256+MomentQYC@users.noreply.github.com> Date: Sat, 26 Oct 2024 21:10:44 +0800 Subject: [PATCH] fix: Unable to crop avatar in some cases --- packages/frontend/src/components/MkCropperDialog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/components/MkCropperDialog.vue b/packages/frontend/src/components/MkCropperDialog.vue index c2a1aaf29a..3bb9f260af 100644 --- a/packages/frontend/src/components/MkCropperDialog.vue +++ b/packages/frontend/src/components/MkCropperDialog.vue @@ -55,7 +55,7 @@ const props = defineProps<{ uploadFolder?: string | null; }>(); -const imgUrl = getProxiedImageUrl(props.file.url, undefined, true); +const imgUrl = getProxiedImageUrl(props.file.url, undefined, true).replace(/^https?:\/\/[^/]+/, location.origin); const dialogEl = shallowRef>(); const imgEl = shallowRef(); let cropper: Cropper | null = null;