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

This commit is contained in:
june 2024-03-15 01:55:52 +09:00 committed by GitHub
parent 0f2f6c9cc0
commit 3f988c0e6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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);
}