Loading
PHP Vulnerability Monitoring Read More
The online Trailblazer Community becomes read-only Oct 30, 2026Read More
Sales Productivity
Add Images to Email Templates in Salesforce Classic

Add Images to Email Templates in Salesforce Classic

You can include images, such as logos, in your custom HTML and Visualforce email templates. Salesforce allows you to use style tags to add external or internal images to an email.

Required Editions

Available in: Salesforce Classic
Available in: All Editions, except Personal

HTML and Visualforce email templates not available in: Personal Edition

Visualforce Classic email templates can’t be used in Lightning Experience
User Permissions Needed
To create or change HTML email templates: Edit HTML Templates
To create or change Visualforce email templates: Customize Application
To create or change public email template folders: Manage Public Classic Email Templates

When creating custom HTML or Visualforce templates, use an <img> tag to reference the image. We recommend uploading the images to the Documents tab and referencing the copy of the image on the Salesforce server.

Note
Note For HTML (using Classic Letterhead) email templates, logos or images come from the letterhead you choose when creating the email template.
  1. Add an image to the Documents tab.
  2. On the Documents home page, open the image by clicking its name.
  3. Right-click the image and get its reusable URL address. When you use the URL, you reference the copy of the image on the Salesforce server.
  4. Open your custom HTML or Visualforce template.
  5. Place the HTML tag <img>, using the image’s URL address, where you want to insert the image in the email template.
Note
Note You can also use the URL of an external website, such as <img src="http://www.401khelpcenter.com/syndicate/img/AF-Logo_Brown_Small.gif" alt="Logo"/>. However, if an image is stored in your org, you have more control over it.

Use the style attribute in HTML to add internal and external images to email templates whose HTML elements can be edited.

Custom (without Using Classic Letterhead) Email Template
Custom (without Using Classic Letterhead) Email Template

Custom (without using Classic Letterhead)

<img src="https://yourInstance.salesforce.com/servlet/servlet.ImageServer?
id=015D0000000Dpwc&oid=00DD0000000FHaG&lastMod=1270576568000"/>
<apex:image id="Logo" value="https://yourInstance.salesforce.com/servlet/servlet.ImageServer?
id=015D0000000Dpwc&oid=00DD0000000FHaG&lastMod=127057656800" />

This example adds an image as the background on an HTML element.

<td style="height:33; background-image:url('https://yourInstance.salesforce.com/
/servlet/servlet.ImageServer?id=015D0000000Dpwc&oid=00DD0000000FHaG&lastMod=1270576568000">
 
Loading
Salesforce Help | Article