add svg image preview support (#6551)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Thanush19 2023-12-13 13:50:03 +05:30 committed by GitHub
parent 0b5e310881
commit ba9f74b248
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -133,7 +133,8 @@ export default function HttpMessage({ flow, message }: HttpMessageProps) {
}
}
const isImage = /^image\/(png|jpe?g|gif|webp|vnc.microsoft.icon|x-icon)$/i;
const isImage =
/^image\/(png|jpe?g|gif|webp|vnc.microsoft.icon|x-icon|svg\+xml)$/i;
ViewImage.matches = (msg) =>
isImage.test(MessageUtils.getContentType(msg) || "");