[thelist] Hex encode images for HTML emails — how?

Barney Carroll barney.carroll at gmail.com
Fri Jun 12 09:03:27 CDT 2009

Thanks guys, many helpful responses. A lot of interesting stuff as a result
of this.

I have concluded that embedded images in email are not a serious possibility
for compatibility reasons.

Not sure if I'm missing a joke here. I'm dealing with a campaign of 100%
HTML emails. Creating these in Outlook is not a serious option — I'm no
stranger to HTML email and if things are going to work accross the board
(gmail, Outlook, Lotus Notes, etc, etc) I'd seriously recommend hand-coding.
I may have thrown you off with the hex-encoding thing. That was nonsense, I
meant base-64. Sorry. A bit concerned about the 'in true style' bit…?

That's exactly what I was after. Thanks a lot! The options on that tool are
fantastic too. One for the bookmarks!

Thanks very much for pointing that out to me — I was completely unaware, and
this is a show-stopper. It turns out that embeding image code is not an HTML
specification, so for once this isn't a clear-cut failure of IE's.

For the sake of this particular campaign, I am applying the label WON'T FIX
and hosting the images myself. However I will research and test further and
come back with some conclusions as to the real viabilities of the theory,
specifically 1) whether conditional comments in HTML email survive parsing
by the major webmail clients and 2) whether similar hackery/proprietary
code/non-dynamic sniffing can in any way be used to present Outlook 2007's
HTML renderer with anything similar (the idea being that I may be able to
offer http refs for src only when needed — in my particular situation this
isn't a solution because hosting has become necessary).

For those who are interested in the subject of image embedding methods and
sidestepping IE's problems for purposes other than widespread email
distribution, Dean Edwards wrote an article on the subject that spawned a
fantastic conversation in the comments [
http://dean.edwards.name/weblog/2005/06/base64-ie/]. In and among these one
madman suggested using Javascript to parse the encoded image pixel per pixel
and render it as literal HTML + CSS code. Another madman /actually did it/:
http://www.bennherrera.com/EmbeddedImage/. Serious practical applications
limited, but still fascinating in an incredibly geeky way.

Barney Carroll
Web designer & front-end developer

web: www.clickwork.net

mobile: +44 (0) 7594 506 381
home: +44 (0) 118 975 0020

twitter: @barneycarroll

More information about the thelist mailing list