Website embeds
Goal: let clients embed a gallery or video directly on their own website using a
copy-paste <iframe> snippet.
Prerequisites
- A client record with Allow website embeds enabled — this is controlled per-client from Clients → [Client] → Edit. It is on by default for new clients.
- A published gallery or video collection that the client has access to.
How clients get the embed code
- Log into the client portal and open a gallery or a video.
- Click the Get embed code button.
- A modal appears with a copy-paste
<iframe>snippet. - Click Copy code and paste it into their website's HTML.
Embed behavior
Photo gallery embeds
A gallery embedded via <iframe> uses auto-height mode —
the iframe grows to fit the full gallery content so there are no scroll bars inside the embed. The
gallery page detects the embed=1 parameter and posts its content height to the parent
window via postMessage, and the embed snippet includes a small script that listens for
this message and resizes the iframe.
Video embeds
A single video embedded via <iframe> uses a responsive aspect-ratio
wrapper (16:9 by default). The video fills the width of the iframe and maintains its aspect
ratio, with a pure black background behind the player. All video controls, captions, and
timestamped comments work normally inside the embed.
What is not shown in embed mode
- The page header, site navigation, and footer are hidden.
- Download buttons and licence modals are removed.
- Only the gallery or video content itself is visible.
Controlling embeds per client
From Clients → [Client] → Edit, the Allow website embeds checkbox controls whether this client can embed galleries and videos on external websites. When unchecked:
- The "Get embed code" button is hidden from the client's portal.
- Any existing embed iframes on external sites immediately show "Gallery not available" or
"Video not available" — the embed shortlink is gated by the client's
embed_enabledflag at render time.