---
schema_version: "1"
id: 4aea4e6ca206f103dc13125c2804902c30511f8792868bab6647f9a2fb808920
title: Image()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/references/content/mc-ampscript-reference-content-image.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-content/mc-ampscript-reference-content-image.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: e40d5dc7971f83251be853327ac9ab3e1f866c546f09bb99e67567e1d1ac3a05
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# Image()

Returns an `img` tag in which the `src` attribute is the path to an image from your Portfolio. The img tag includes the title and alt information for the selected image, a `border` attribute set to `0`, and a `thid` attribute that contains the ID of the image in the Portfolio.

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>❌ No</td>
  </tr>
</table>

## Syntax

```
Image(imageExternalKey, defaultImageExternalKey)
```

The `Image()` function has two parameters:

- `imageExternalKey` (string): Required. The external key of an image in your Portfolio.
- `defaultImageExternalKey` (string): The external key of a fallback image in your Portfolio. The function uses this image if it can’t find the image that you specified in the `imageExternalKey` parameter.

## Usage

To use this function, pass it the external ID of an image in your Portfolio. You can optionally specify a default image to use if the function is unable to find the first image.

```
%%=Image('CorpLogo','DefaultImage')=%%
```

If the function finds the image that you specified in the first parameter, it returns an `<img>` tag that refers to that image.

```
<img title="Logo" alt="Logo" src="http://images.example.com/logo.gif" border="0" thid="8039b510-bb65-4b3b-a803-b12406122c48">
```

If the function doesn’t find the specified image, it returns an `<img>` tag that refers to the image that you specified in the second parameter.

```
<img title="Default" alt="Default" src="http://images.example.com/default.gif" thid="aadf20eb-b39c-4750-90b8-fc1a46090ef1">
```
