How to Host Images for HTML Email

How to Host Images for HTML Email?

What is the best way to host images for HTML email? Do you need a
separate web site for the images, or do you simply copy/paste the images into the HTML email, or can you just link to the images on a web site? This article will answer these image hosting questions.

The image hosting options available for HTML email are limited to the following:

  • Uploading the images to an external web server, then using the image URL to reference the images in the HTML email message, or
  • Uploading the images to a web site and inserting the image link into the HTML message.

For reasons that are discussed below, we recommend that you use an external web server to store your images rather than upload the images directly to your email message.

Uploading images to an external web server

There are several advantages to hosting images on an external web
server.

The image is accessible directly from the web server where it is
stored rather than through the email client. You can make the image
links more attractive by creating a customized image directory on the web server and using CSS to style the image.

An external web server can be shared between multiple users or
groups. This allows you to control access to the image and gives you
the flexibility to host multiple copies of the same image.

If you want to host images on an external web server, you need to
make sure that your HTML email message includes an image reference. This reference should be a direct URL, not an indirect reference (such as http://server-name/images/image.jpg).

You can then add a reference to the image in the HTML message as follows:

<img src="http://example.com/images/image.jpg" width="600" height="400"
alt="Sample Image" align="left" border="0" />

Use a web page to provide a link to the image

Another way to reference the image is to link to a web page where
the image is displayed. This approach is often used by graphic artists
who create a web page for a client, then host the web page on a web
server. The web page is then linked to from the email message. The
advantages of using this approach are:

Images can be added and edited on the web page.

The web page is portable, so the same image can be hosted on the web server for several different email messages.

If you want to host images on a web site that is shared with multiple users, you can use a URL shortener service to provide the shortened image URLs. If you use a service such as Google’s URL shortening service, you can shorten the URLs so that they are a maximum of 20 characters.