Syntax

Platform.Function.ContentImageByID(id[, fallbackId])
1–2 arguments

Parameters

Name Type Required Description
id number Yes Numeric ID of the image in Content Builder
fallbackId number No ID of a replacement image when the primary cannot be resolved

Return value

A string containing an img tag (including typical attributes such as src, alt, and title as provided by the platform).

Examples

var banner = Platform.Function.ContentImageByID(1234567);
Write(banner);
var icon = Platform.Function.ContentImageByID(555, 999);
Write(icon);

See Also