From 1ccad83686ae890d92bf07852a2569f48c94bda7 Mon Sep 17 00:00:00 2001 From: fantasticit Date: Sat, 4 Jun 2022 23:03:28 +0800 Subject: [PATCH] tiptap: fix get image size --- packages/client/src/tiptap/core/wrappers/image/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/tiptap/core/wrappers/image/index.tsx b/packages/client/src/tiptap/core/wrappers/image/index.tsx index 20206ba9..425a4010 100644 --- a/packages/client/src/tiptap/core/wrappers/image/index.tsx +++ b/packages/client/src/tiptap/core/wrappers/image/index.tsx @@ -50,7 +50,7 @@ export const ImageWrapper = ({ editor, node, updateAttributes }) => { try { const src = await uploadFile(file); - const size = await getImageWidthHeight(file); + const size = await getImageWidthHeight(src); updateAttributes({ ...fileInfo, ...size, src }); toggleLoading(false); } catch (error) {