5.4 Images

mu4e lets you view images attached to messages inline. Here we discuss how; this applies only to plain-text and shr rendering, not xwidget rendering. For xwidget, you cannot currently configure how to deal with inline images when using xwidget; it never loads remote images, but does show embedded ones.

When you run Emacs in graphical mode, by default images attached to messages are shown inline in the message view buffer.

To disable this, set gnus-inhibit-images to t. By default, external images in HTML are not retrieved from external URLs because they can be used to track you.

Apart from that, you can also control whether to load remote images; since loading remote images is often used for privacy violations, by default this is not allowed.

You can specify what URLs to block by setting gnus-blocked-images to a regular expression or to a function that will receive a single parameter which is not meaningful for mu4e.

For example, to enable images in Github notifications, you could use the following:

(setq gnus-blocked-images
   (lambda(&optional _ignore)
     (if (mu4e-message-contact-field-matches
         (mu4e-message-at-point) :from "notifications@github.com")
        nil ".")))

mu4e inherits the default gnus-blocked-images from Gnus and ensures that it works with mu4e too. However, mu4e is not Gnus, so if you have Gnus-specific settings for gnus-blocked-images, you should verify that they have the desired effect in mu4e as well.

Finally, for some messages with big images, it can be useful to enable buttons and full display, e.g. for saving inline images. For this you can try M-x mu4e-view-show-mime-parts. This can be a little slow.