How to insert pictures into your templates

In Shared Email Templates for Outlook

In Shared Email Templates, you can insert pictures from OneDrive, SharePoint, and URLs, add the <img> tag directly to the HTML code, or create an Outlook draft, insert an image into it, and use this draft as a template.

Click the button below to open or download a quick How to insert pictures cheat sheet:

Download cheat sheet

Before you start

Before adding images in Shared Email Templates, read the notes below.

  • To avoid signing in to your Microsoft account each time you insert images from OneDrive or SharePoint, enable the SSO option. Here are more details.
  • When inserting a picture from OneDrive with the ~%InsertPicture macro in a template that is shared with other users, make sure that your teammates have access to the corresponding file or folder in OneDrive. You can create a special folder in your OneDrive, share it with all your teammates, and collect all the images you share in templates there. For detailed information on managing access in OneDrive, visit the Share OneDrive files and folders page on the Microsoft Support website.
  • When inserting a picture from SharePoint with the ~%InsertPicture macro in a template that is shared with other users, make sure that your teammates have access to the corresponding file or folder in SharePoint. For detailed information on managing access in SharePoint, visit the Share SharePoint files or folders page on the Microsoft Support website.
  • When you use a template containing the ~%InsertPicture macro to insert an image from OneDrive or SharePoint, the macro downloads the chosen file and attaches it to the email message that is currently opened.
  • When you use a template containing the ~%InsertPicture macro to insert an image from SharePoint, you have to be logged in to SharePoint so that the macro has access to the file.
  • Inserting images from SharePoint with the ~%InsertPicture macro won't work on free accounts, such as Outlook.com, as they do not have SharePoint.
  • When inserting a picture from a URL with the ~%InsertPicture macro in a template that is shared with other users, make sure that your teammates have access to the specified URL.

Insert an image from OneDrive

To insert an image from OneDrive with the ~%InsertPicture macro, open your template in the Edit mode and click the Insert macro icon:
The Insert macro icon

Into the Search box, type "insert picture" to find the desired option. Double-click Insert Picture from OneDrive or select it and click Select:
Select the necessary option.

If single sign-on is not enabled when you select Insert Picture from OneDrive, the add-in will ask you to log in to your OneDrive account.

Select the image that is going to be inserted and click Select. Also, you can Upload an image from your local storage to OneDrive and then insert it.
Select the picture to be inserted.

You can set the size of the image (in pixels), add Link URL and Link title, or leave these fields empty and click Insert:
Resize your image.
If you don't enter the width and height, the image will be inserted in its original dimensions.

In the text of your template, you'll see the macro placeholder:
The macro placeholder

Add a picture from SharePoint

To add an image from SharePoint, open your template in the Edit mode and click the Insert macro icon:
The Insert macro icon

Into the Search box, type "insert picture" to look for the option you need. Double-click Insert Picture from SharePoint or select it and click Select:
Select the necessary option.

If single sign-on is not enabled when you select Insert Picture from SharePoint, the add-in will ask you to log in to your SharePoint account.

Select the image of interest and click Select. Also, you can Upload an image from your local storage to SharePoint and then insert it.
Select a picture.

You'll see the Insert picture dialog:
Resize your image.

You can set the size of the image (in pixels), fill in the Link URL and Link title fields. If you don't enter the width and height, the image will be inserted in its original dimensions.

When you're done, click Insert.

The macro placeholder will appear in your template:
The macro placeholder

Insert an image from a URL

To insert an image from a URL, click the Insert macro icon:
The Insert macro icon

Into the Search box, type "insert picture" to find the necessary option. Double-click Insert Picture from URL or select it and click Select:
Select the necessary option.

Enter the address of the picture to be inserted. If necessary, set the size of the picture, add Link URL and Link title. Then click Insert:
Enter the picture address.
If you don't enter the width and height, the image will be inserted in its original dimensions.

What not to do while inserting images from URLs

When using Insert Picture from URL, don't try to enter links to images stored in OneDrive or SharePoint into the Picture address field of the Insert Picture from URL dialog window. For example, you might want to open a picture in a browser, copy its address from the address bar, and try to paste it into the Picture address field in the Insert Picture from URL dialog window. This won't work. Also, if you copy a link to an image while sharing it in OneDrive and paste it into the Picture address field, it won't work either.

Add an image in HTML

To insert a picture into a template, you can edit the template HTML code and use the <img> tag there.

Create a new template or start editing an existing one and click the View HTML icon:
Click the View HTML icon.

Enter the <img> tag along with a URL and the size of an image. For example, the image that is going to be inserted, say, logo.webp, is at https://cdn.company.com/, and you want it to be 150px wide and 80px high. In this case, the HTML code will be as follows:

<img src="https://cdn.company.com/logo.webp" width="150" height="80">

If you want to insert the image in its original dimensions, you can omit to specify the width and height, and the HTML code will look like this:

<img src="https://cdn.company.com/logo.webp">

Tip. You can also indicate the size of the image to be inserted in percentage of its original size:

<img src="https://cdn.company.com/logo.webp" width="80%" height="80%">

When HTML is ready, click OK:
View HTML.

The image will be displayed in your template but not downloaded and attached, so if the image gets unavailable by the URL, it won't be pasted and displayed in your email messages.

Note. If you use the <img> tag in a template that is shared with other users, make sure that your teammates have access to the specified URL.

Use an Outlook draft with an inserted image

You can also insert images by using Outlook drafts as templates. In this case, you need to create a draft in Outlook, insert an image, and link the folder with this draft to Shared Email Templates. Here is our How to use Outlook drafts as templates guide.

Single sign-on (SSO) for OneDrive and SharePoint

If you've got only one OneDrive account that is the same as your Microsoft 365 Outlook account (that is indicated in Outlook File → Account information), you can take advantage of single sign-on to avoid entering or confirming your credentials each time you use the ~%InsertPicture macro to insert images from OneDrive or SharePoint.

With single sign-on, you'll accept the permissions for the app only once:
Requested permissions

After that, all images will be inserted without any additional pop-ups.

Disable single sign-on

The single sign-on feature is turned on by default. If you need to use images from different OneDrive accounts, turn single sign-on off. For this, click the three dots in the lower-right corner of the add-in pane and select Profile:
Click Profile.

Click Edit Account:
Here is the Edit Account icon.

Here is the checkbox you need:
SSO

Important notes

Note. The single sign-on feature:

  • Is not supported in the web app. It is available only in the Outlook add-in (desktop or online).
  • Is available only if your Outlook provides mailbox API 1.9 and higher.
  • Works in Microsoft 365 accounts only and isn't supported in free Outlook.com accounts.

You might see an error message in red below the Use single sign-on (SSO) where possible checkbox. In most cases, the message is related to one of the points mentioned above.

However, if you see the 'SSO is not supported in your current add-in version' message, most probably, you simply need to wait a bit till the app is updated in your account. The speed of this process depends on Microsoft and we can't influence it.