Layers and text
The Media Delivery API lets you overlay images and text onto a base asset. Layer 0 is always the base and further layers are added on top using indexed parameters, each with its own source, position, anchor, opacity, and visibility.
Base URL pattern
The parameters on this page are appended to a Dynamic Media image URL. For the URL pattern and how parameters chain together, see the Media Delivery API guide.
LayersLink copied!
Layers allow multiple images to be composited together. Layer 0 is always the base image. Additional layers are applied on top using indexed parameters (layer1, layer2, etc.). Parameters for each layer are enclosed in square brackets [].
To apply parameters to the base image itself, address it as layer0:
src - Layer image sourceLink copied!
The URL of the image for the specified layer. Starting the path with /i// reuses the account domain from the base URL.
top, left, bottom, right - Layer positionLink copied!
Positions a layer relative to the previous layer. By default, layers are positioned in the top-left corner. Values can be pixels or percentages.
Combine with anchor for fine-grained control.
anchor - Layer anchorLink copied!
Specifies which point of the layer aligns to the position coordinates. Use with top, left, bottom, right.
| Value | Description |
|---|---|
TL | Top left |
TC | Top center |
TR | Top right |
ML | Middle left |
MC | Middle center |
MR | Middle right |
BL | Bottom left |
BC | Bottom center |
BR | Bottom right |
opacity - Layer opacityLink copied!
Sets the transparency of a layer. 0 is fully transparent; 100 is fully opaque.
visible - Layer visibilityLink copied!
Controls whether a layer is rendered. 0 is hidden; 1 is visible. Default is 1.
canvas - Canvas layerLink copied!
Creates a blank canvas of the specified dimensions onto which other layers can be drawn. Optionally specify a background colour with bg. Default background is white.
Format: canvas={width},{height}
Text layersLink copied!
Text can be rendered as a layer on top of an image.
| Parameter | Values | Description |
|---|---|---|
text | string | Text string to render. Use \n or %0A to insert a line break. |
fontSize | integer (pt) | Font size in points. Default: 10. |
fontFamily | string | Font family. Default: Helvetica. Falls back to Helvetica if the requested font is not installed. |
fontStyle | normal, italic, oblique | Font style. Follows CSS font-style rules. |
fontWeight | 100–900 in multiples of 100, normal, bold | Text weight. normal = 400; bold = 700. |
fontStretch | ultra-condensed … ultra-expanded | Widens or narrows text. Follows CSS font-stretch rules. |
textColor | hex, rgb(), or named colour | Colour of the rendered text. Default: black. |
textDecoration | underline, overline, linethrough | Decoration applied to the text. |
textAlign | left, center, right | Alignment within the text layer (applies when text spans multiple lines). Default: left. |