Images

Other topics

Foreground Images

Basic foreground images can be inserted into an email document just like they are for web pages:

<img src="http://www.yourserver.com/email/images/logo.png">

And they can be made links by wrapping them in an <a href> tag:

<a href="http://www.yourwebsite.com">
    <img src="http://www.yourserver.com/email/images/logo.png">
</a>

Email <img>s use many of the same attributes as on the web, including some that are deprecated on the web, are included at the bottom of this page under Parameters.


āœ– don't use relative image paths:

<img src="images/logo.gif">

āœ– It's advisable not to use base64. It's not supported in Outlook and can quick bloat the file size of an email, which triggers spam filters.

<img src="data:image/png;base64,iVBOR..." alt="Your Image">

Parameters:

ParametersDetails
alignSpecifies the alignment of an image relative to the surrounding element(s)
altAlternative text that should be displayed if for some reason the image could not be displayed
borderHow the element handles crossorigin requests
heightSpecifies the height of the image (optional)
srcSpecifies the URL of the image
srcsetImages to use in different situations (e.g., high-resolution displays, small monitors, etc)
styleSpecifies inline styles to be applied to an element
usemapName of image map to use
widthSpecifies the width of the image

Contributors

Topic Id: 8307

Example Ids: 26658

This site is not affiliated with any of the contributors.