Different Ways to Upload an Image in Template
When creating an HTML Email template that includes images, there are different ways you can upload and reference images, depending on how you want them to be served and how you plan to manage them. The three main ways to include images in a template are:
This is the most common way of including images in a template. You simply reference the image hosted online using its URL.
Example:
<img
src="https://www.example.com/path/to/image.jpg"
alt="Image">
In this case, the image is served from a remote server and the template references it by its URL.
This is commonly used in HTML emails where images are embedded within the email itself, rather than being linked externally. The cid (Content-ID) method embeds the image inside the email, and you reference it in the HTML using a specific identifier.
Example:
<img src="cid:unique-image-id" alt="Inline
Image">
●
How to set it up:
○ When sending an email, you include the image as an attachment and assign it in HTML over TSAT portal using template name.
○
In the HTML of the email, you
reference the image using the cid: syntax.
Base64 encoding converts the image into a text string and embeds it directly into the template, which is useful for small images, icons, headers or logos
Example: <img
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA..."
alt="Base64 Image">
To convert an image to Base64:
●
You can use an online tool (eg:
www.base64-image.de or www.base64decode.org)
Note: This is compatible with Outlook. G-Suite does not support Base 64 encoding of images
● Image URL (src): Reference external image hosted on a server.
● CID (src="cid:"): Embed an image inline in emails using a unique identifier.
● Base64: Embed the image directly into the template as a text string, useful for small images.
Choose the method based on your use case. For emails, cid or Base64 might be preferable for inline images, whereas URLs are great for general web pages.