From 3f988c0e6b827c4bd06893c39e5347138973a7b8 Mon Sep 17 00:00:00 2001 From: june <72508905+june23hy@users.noreply.github.com> Date: Fri, 15 Mar 2024 01:55:52 +0900 Subject: [PATCH] Add support for svg images to imageview command (#453) --- src/plugins/image/image.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/image/image.tsx b/src/plugins/image/image.tsx index 256a26bec..c96be3ab5 100644 --- a/src/plugins/image/image.tsx +++ b/src/plugins/image/image.tsx @@ -53,6 +53,9 @@ class SimpleImageRenderer extends React.Component< ); } + if (dataBlob.name.endsWith(".svg")) { + dataBlob = new Blob([dataBlob], { type: "image/svg+xml" }) as ExtBlob; + } if (this.objUrl == null) { this.objUrl = URL.createObjectURL(dataBlob); }