Going GUI...er

Sam Kuper sampablokuper at posteo.net
Sat Apr 4 23:09:55 UTC 2020


On Sat, Apr 04, 2020 at 07:18:42PM +0200, steve wrote:
> I can display images, read pdf's, etc… but one thing I never managed
> to do is open an html file containing images. I mean, I can send the
> html part to firefox but the images don't follow.
> 
> How do you guys cope with that?

Depends what you mean by "an html file containing images".

I'll assume you mean that the email has multiple parts or attachments,
one (or more) of which is an HTML file and one (or more) of which is an
image file, and that the HTML file has an "img" element with a "src"
attribute whose value is the name of the image file (at some path).

(That is an inconsiderate way to send "email", but some people do it.)

If so, probably the simplest way of coping with that is:

- View the HTML file via your preferred browser.

- Then view the images separately (hit 'v' in Mutt to see the mail's
  attachments/parts; move the cursor to the relevant entry; hit 'Enter'
  to view that image).

- Alert the sender of the email to the fact that their email was
  problematic.

- If the sender is unsympathetic, then try to minimise email
  communications with that person in the future.  (Basically, treat them
  approximately as if they were sending you spam or malware.)

Alternatively, you could save the HTML file and the images to some
directory, and fix the HTML's "src" attributes if needed to ensure that
they point to the image files.  Relative paths would be the best choice.
(I suppose this could be scripted using Bash/Sed, Perl, Python, or
whatever.)  You'd then open the HTML file in an image-capable browser,
and it should look roughly as the sender intended.

Good luck.

-- 
A: When it messes up the order in which people normally read text.
Q: When is top-posting a bad thing?

()  ASCII ribbon campaign. Please avoid HTML emails & proprietary
/\  file formats. (Why? See e.g. https://v.gd/jrmGbS ). Thank you.


More information about the Mutt-users mailing list