Link to home
Start Free TrialLog in
Avatar of sPuff_Programmer
sPuff_Programmer

asked on

Outlook for XP (How to embed images into HTML email without absolute linking)

I'm trying to embed some images into my HTML file so that when I setup a new template with Outlook's "Stationery Picker..." I can select the HTML file I wish to use and the images will be embeded rather than pointing to the web server to download them when the user opens the received email.

I cannot find out how to do this at all and I have scoured the internet for DAYS!

I've been trying to find out more about CID: (Content-ID) but it all seems very complicated and I can't understand (or find any information on...) how to change a absolute URL like http://www.mydomain.com/images/header.gif into a CID: url?

All other ways of embedding an image seem to require server-side code to embed the image, but I'm not sending my email from a server using server-side code but sending via the Email client (Outlook software) with a HTML file.

If anyone can help me out here as this is now starting to drive me bonkers! and the client is screaming down my neck to get a solution sorted (because currently we are pointing the images to the server absolutely - i.e. http://www.mydomain.com/images/header.gif - and the client is unhappy with having absolute pointing images as the recipients cannot view the email images without an internet connection).

Please help.

Kind regards,
Mark
Avatar of David Lee
David Lee
Flag of United States of America image

Greetings, sPuff_Programmer.

The CID tags are created internally by Outlook.  The simplest way to embed the images is to have them in the same folder as the HTML file, which is exactly what you see with stationery.  You can then refer to the image by its name with no need for a path.  Outlook will automatically embed those images.

Cheers!
Avatar of sPuff_Programmer
sPuff_Programmer

ASKER

Hi BlueDevilFan,

Thanks for the quick response.

I've got a folder on my desktop called "Converso" (converso being the client), within this folder is another folder called "Test" and within this test folder is my HTML file and all the images.

The images in my HTML file just refer to the image names as the path is the same as the HTML file (e.g. <img src="header.gif">).

Now if I go to the Stationery Picker in Outlook and setup a new stationery with this HTML file I have the pictures do not appear when I click on "New Message"? I right click on the broken image and select "Properties" the "Picture Src" says "outbind://6/header.gif" should I change this to just "header.gif" or leave as "outbind://6/header.gif" ?

At the moment the image is broken if I leave it as "outbind://6/header.gif" but if I change the src to "header.gif" not only does the image stay broken but the size of the image shrinks down to a small square which obviously is even worse so I'm assuming I have to leave it as "outbind://6/header.gif"?

I sent the email twice to myself, once with the Picture Src left as it was "outbind://6/header.gif" and the second time I sent it I changed the Picture Src to just "header.gif".

The first email didn't embed the pictures. I viewed the source of the email and the HTML showed that the image src was still exactly like the HTML (i.e. not a CID: converted name - <img src="header.gif">).

The second email also didn't embed the pictures. I viewed the source of the email but the HTML was slightly different and showed that the image src was now <img src="file://header.gif">.

But regardless, neither way embeded the images!?

Also, in my Outlook I have a specific option selected, if you go to "Tools > Options..." then "Mail Format > Internet Format...", I have the first section "HTML options" checkbox selected (i.e. "When an HTML message contains pictures located on the Internet, send a copy of the pictures instead of the reference to their location"), will this cause problems or not?

Thanks again for your quick response, hopefully you can help me resolve this issue.

Kind regards,
Mark
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi BlueDevilFan,

This has worked!

NOTE:
I had to make sure the images were in the same folder as the HTML otherwise it didn't work (e.g. I had created a folder called "images" within C:\Program Files\Common Files\Microsoft Shared\Stationery - and changed the image paths in the HTML to point to that sub folder - "images/header.gif").

Thank you so much.

Kind regards,
Mark
You're welcome, Mark.  I'm glad I was able to help out.  If you're satisfied with the answer, then please don't forget to close the question.
Sorry, stupid question, how do I close the question?

Thanks

Mark
When you view the question there should be buttons labeled "Accept" next to the various posts.  Click the button next to the post that you feel answered or contributed most to answering the question.