I am trying to add images to a custom HTML email template using a letterhead. My letterhead images (header and footer) works just fine. However, when I add an tag in the body of the template, it shows up as text. The image is not embedded into the template.

I am using the same tag in another email template (Visualforce) and that works just fine. How do I add images to the body of letterhead template?

3 Answers 3


I actually found out the answer. When editing email templates that use letterheads, there is an "add image" icon/button in the Formatting Controls that will allow you to add images to the template. The image has to be in a document of course.

This will allow you to add images to the body of the template. It doesn't seem like you can use something like :

<img src="https://cs8.salesforce.com/servlet/servlet.ImageServer?id=idofimage&oid=organizationid" alt="banner" height="31" width="300"/>

From the documentation:

When creating custom HTML or Visualforce templates, simply include img tags that reference the image. We recommend uploading the images to the Documents tab and referencing the copy of the image on the Salesforce server. For example, for HTML:

<img src="https://na2.salesforce.com/servlet/servlet.ImageServer?
id=015D0000000Dpwc&oid=00DD0000000FHaG&lastMod=1270576568000" alt="Company Logo" 
height="64" width="64"/>
  • 2
    That is exactly what I'm doing. But the img tag just outputs the link and not an image Commented Aug 22, 2014 at 1:32
  • Could you please edit your post to show the link that's working in your VF template and the link in the new HTML template that isn't working? Lets compare to see what's different and look to see what may be problematic with your image tag in the new HTML template.
    – crmprogdev
    Commented Aug 22, 2014 at 9:30
  • Not working!! Please refer :: salesforce.stackexchange.com/questions/172409/… Commented May 1, 2017 at 19:19

Copy the URL of document and use it in the image or apex tag.

Similar issue; you can find solution here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .