From 4d87d203cfb9c407930332d53b8198328236fe9b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 24 May 2026 09:41:26 +0300 Subject: [PATCH] Fix display of inline SVG images in Rmail * lisp/mail/rmailmm.el (rmail-mime-set-bulk-data): Support Content-type of "svg+xml" if SVG images are supported, --- lisp/mail/rmailmm.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 9226976c114..e70f96cb2f8 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -842,8 +842,11 @@ directly." ((string-match "text/" content-type) (setq type 'text)) ((string-match "image/\\(.*\\)" content-type) - (setq type (image-supported-file-p - (concat "." (match-string 1 content-type)))) + (let ((fnext (match-string 1 content-type))) + ;; Ask about SVG support when Content-type is image/svg+xml. + (if (equal fnext "svg+xml") + (setq fnext "svg")) + (setq type (image-supported-file-p (concat "." fnext)))) (when (and type rmail-mime-show-images (not (eq rmail-mime-show-images 'button))