Media
Two ways to place a gallery image, differing in what the identity is and what the default layer
is. Both resolve to a CDN URL at Tier 1. Single-quote the surrounding HTML
attribute (src='…') when the tag argument uses double quotes — every quote
combination works, this just keeps editors from "repairing" the markup.
Shared refs — {{media ref="slug"}}
<img src='{{media ref="demo-product"}}' alt="Product shot">The ref is shared: with no override it resolves to the single global asset whose reference is demo-product, so reassigning that ref in the gallery swaps the image for every site using the template — ideal for logos and brand assets. A SITE can also pick a different image for a ref (a per-site override that lives aside; the template HTML is never touched).
Named slots — {{media.name value="slug"}}
A named slot splits identity (the name — the key you repoint, riding
the full site_page → site → global scope chain per name) from initial
value (value="slug" — a build-time seed resolved to that ref's default
asset). Two slots with different names are independent even when seeded from the same asset —
the thing a shared ref cannot do. The value= attribute is stripped from the
delivered HTML, exactly like {{var.x value=…}}.
<img src='{{media.showcase value="demo-product"}}' alt="Named slot (dot form)">Dot form. The slot surfaces as media.showcase in the variable panel with the gallery picker — repoint it per-site or per-page without touching the template.
<img src='{{media name="showcase_alt" value="demo-og"}}' alt="Named slot (attribute form)">Attribute form — identical semantics to the dot form; name= carries the identity. A tag carrying only ref= stays shared; the presence of name= or the dot makes it named.
Choosing a model
| Want | Use |
|---|---|
| Image shared across all sites by default, swap globally | {{media ref="logo"}} (no override) |
| Same as above, but one site picks a different image | {{media ref="logo"}} + per-site override |
| Two placements repointed independently per-site/per-page | named media — {{media.hero value="hero-default"}} |
| Image an AM picks per-site/per-page, no ref slug | a media-typed variable — {{var.hero_image}} |
| Image inside a reusable block | a component with a self.image media var |