Loading

How to Add a Hyperlink to an Image or Text in Salesforce Email Templates

Publiceringsdatum: Jun 30, 2026
Beskrivning

This article explains how to configure a Salesforce email template so that an image or a block of text routes the recipient to a specific web address (hyperlink) when clicked.
This process applies to both Salesforce Classic HTML email templates and Lightning Experience email templates.
Important Notes:

  • Salesforce does not support custom HTML Email Template content. This functionality applies to native email templates only.
  • There is no option to insert images directly into custom HTML Email Templates.
Lösning

How to Hyperlink an Image in a Salesforce Email Template

In Salesforce Classic

To navigate to Classic Email Templates: Go to Setup, enter Classic Email Templates in the Quick Find box, select an email template, ensure the format is HTML, and click Edit HTML Version.

  1. In the email template body, add the URL you want to link to. For example, type: www.salesforce.com.
  2. Highlight the text you typed, then click the link icon on the Formatting Controls ribbon.
  3. In the dialog, enter the destination URL in the destination path field, then click OK.
  4. Now, highlight the linked URL text you just created.
  5. Click the image icon and select or upload the image you want to use as the hyperlink.
  6. Click Save to save the template.

In Lightning Experience

To navigate to Lightning Email Templates: Click the App Launcher, search for Email Templates, and open the Email Templates app. Select All Email Templates from the list and choose a template. Click Edit to open the editor.

  1. Click the Source button in the editor toolbar to switch to HTML source view.
  2. In the HTML, locate the position where you want to add the linked image.
  3. To create a clickable image, write an anchor element that: opens with the target URL as the href attribute value, contains an image element (img tag) with the hosted image URL as the src attribute value, and closes the anchor element. This structure makes the image a clickable link to the specified URL.
  4. Alternatively, use the image icon in the editor to insert the image visually, then highlight the inserted image and click the link icon to add a hyperlink URL to it — no source code editing required.
  5. Adjust the image size if necessary and click Save.

How to Hyperlink Text in a Salesforce Email Template

In Salesforce Classic

  1. In the email template body, highlight the text you want to turn into a hyperlink.
  2. Click the link icon on the Formatting Controls ribbon.
  3. In the dialog box, enter the destination URL.
  4. Click OK to apply the link.
  5. Click Save to save the template.

In Lightning Experience

  1. Click the App Launcher and search for Email Templates.
  2. Click Email Templates, then All Email Templates, and select a template.
  3. Click Edit to open the editor.
  4. To add a text hyperlink in source view: click the Source button, locate the text in the HTML, and wrap the text in an anchor element with the destination URL as the href attribute value. This creates a clickable text link that navigates the recipient to the specified URL when clicked.
  5. Alternatively, highlight the text in the visual editor and click the link icon to enter the destination URL directly — no source code editing required.
  6. Click Save.
Knowledge-artikelnummer

000384067

 
Laddar
Salesforce Help | Article