From ba9f74b248e06405bcbcf42f0733d60d4242f4ef Mon Sep 17 00:00:00 2001 From: Thanush19 <110150744+Thanush19@users.noreply.github.com> Date: Wed, 13 Dec 2023 13:50:03 +0530 Subject: [PATCH] add svg image preview support (#6551) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- web/src/js/components/contentviews/HttpMessage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/js/components/contentviews/HttpMessage.tsx b/web/src/js/components/contentviews/HttpMessage.tsx index 66bdcdcf8..daf23bebf 100644 --- a/web/src/js/components/contentviews/HttpMessage.tsx +++ b/web/src/js/components/contentviews/HttpMessage.tsx @@ -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) || "");