Image

This function returns an HTML img tag with the specified Portfolio image. It also sets the title, alt, border and thid attributes on the img tag. The title and alt values are set to the name of the image as defined in the Portfolio. The border is set to 0 in all circumstances. The thid is a proprietary Marketing Cloud attribute that contains the ID of the specified image in the Portfolio.

Arguments

Image(1,2)

Ordinal Type Required Description
1 String True Customer/External Key value of the image to return
2 String True Customer/External Key value of the image to return if the image for the specified Customer/External Key is not found

NOTE: The Portfolio ID in the thid value is not visible in the Marketing Cloud interface.

NOTE: Keys for the Portfolio item can be found by selecting the item in the listing page and then clicking the Properties option in the toolbar.

Example 1

%%[

var @imageKey, @imageKeyFallBack, @imageTag
set @imageKey = "limedash-logo-green"
set @imageKeyFallBack = "limedash-logo-gray"

set @imageTag = Image(@imageKey, @imageKeyFallBack)

]%%
<a href="https://limedash.com">%%=v(@imageTag)=%%</a>

Output

<a href="https://limedash.com"><img title="limedash-logo-green" alt="limedash-logo-green" src="https://image.S7.exacttarget.com/lib/fe9213727567077b7d/m/1/087ae025-7205-4121-8d5c-366f4a3dc117.png" border="0" thid="c87075e6-1959-4e6c-8a08-775a40ca056e"></a>

Example 2

This example illustrates the output when the specified Customer/External Key does not exist and the fallback image is returned:

%%[

var @imageKey, @imageKeyFallBack, @imageTag
set @imageKey = "limedash-logo-pink" /* does not exist */
set @imageKeyFallBack = "limedash-logo-gray"

set @imageTag = Image(@imageKey, @imageKeyFallBack)

]%%
<a href="https://limedash.com">%%=v(@imageTag)=%%</a>

Output

<a href="https://limedash.com"><img title="limedash-logo-gray" alt="limedash-logo-gray" src="https://image.S7.exacttarget.com/lib/fe9213727567077b7d/m/1/8aabd3b9-cf2a-4d41-a56b-bec76e2efd54.png" border=0 thid="fd7c5499-1409-44cb-90d7-0873e7b51b20"></a>