Different Ways to Upload an Image in Template

Different Ways to Upload an Image in Template

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:

1. Using an Image URL (src URL)

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.

2. Using cid (Content-ID) for Inline Images (for emails)

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.

3. Using Base64 Encoding for Images

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


Summary

     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.



    • Related Articles

    • What if I want to upload an image as a template?

      ThreatCop comes with various pre-installed templates, one of which is "Custom CID Code" available in the System Templates.   Create a clone of the template and edit it according to your preferences to upload an image as a template. You'll need to ...
    • Different type of Templates (HTML, Image--CID,Base64)

      HTML Templates In HTML templates, you craft the HTML code by selecting the source button within the email template tab. Subsequently, upon clicking the source button again, you can preview how the template will appear when it is sent to the users. ...
    • How to create Attachment Template in TSAT?

      Please follow the below steps to create a Attachment Template Step 1 : Click on Campaign Templates" on left side menu and then click on "Create New" as shown in the below screenshot. Step 2 : Input the below details in the opened form after clicking ...
    • How to create QRcode Template in TSAT?

      Please follow the below steps to create a Phishing Template Step 1 : Click on Campaign Templates" on left side menu and then click on "Create New" as shown in the below screenshot. Step 2 : Input the below details in the opened form after clicking on ...
    • How to create Ransomware Template in TSAT?

      Please follow the below steps to create a Ransomware Template Step 1 : Click on Campaign Templates" on left side menu and then click on "Create New" as shown in the below screenshot. Step 2 : Input the below details in the opened form after clicking ...