Add support for svg images to imageview command (#453)

This commit is contained in:
june
2024-03-14 09:55:52 -07:00
committed by GitHub
parent 0f2f6c9cc0
commit 3f988c0e6b
+3
View File
@@ -53,6 +53,9 @@ class SimpleImageRenderer extends React.Component<
</div>
);
}
if (dataBlob.name.endsWith(".svg")) {
dataBlob = new Blob([dataBlob], { type: "image/svg+xml" }) as ExtBlob;
}
if (this.objUrl == null) {
this.objUrl = URL.createObjectURL(dataBlob);
}