media
A picture or video from an offer gallery.
Generated from the platform code - always matches what the theme engine allows.
A picture or video from an offer gallery. Pass it to |image_url.
Available on: offer page.
Properties
| Property | Type | Description |
|---|---|---|
media.id |
string | Media identifier. |
media.mediaType |
string | image or video. |
media.alt |
string | Alternative text. |
media.width |
number or null | Width of the original in pixels. |
media.height |
number or null | Height of the original in pixels. |
media.url |
string | Address of the original file. |
media.posterUrl |
string or null | Poster frame of a video. |
Methods
| Method | Returns | Description |
|---|---|---|
media.urlForWidth(width) |
string | The rendition closest to a width - used by |image_url(width: …). Prefer the filter. |