diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 22d4cde34a7..97f8bed88c1 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1197,7 +1197,8 @@ Return a string with image data." (libxml-parse-xml-region (point) (point-max)) 'utf-8))) ;; SVG images often do not have a specified foreground/background ;; color, so wrap them in styles. - (when (eq content-type 'image/svg+xml) + (when (and (display-images-p) + (eq content-type 'image/svg+xml)) (setq data (svg--wrap-svg data))) (list data content-type)))