---
title: "Feature: External media, without loading it in advance"
manual: "Frontend Theme for Extension Development"
version: "main"
source: "Changelog/2.0/Feature-ExternalMedia.rst"
modified: "2026-09-17T04:52:50+00:00"
---

# Feature: External media, without loading it in advance

## Description

A new content element, **External media**, in the **Theme**
group of the **Create new content element** wizard. It shows a video of
another site - and loads nothing from that site until a visitor presses play.

The editor gives it an address, a name, a shape and a poster image:

| Field | Is |
| --- | --- |
| **Address of the video** | The page of the video, as you copied it out of the browser. |
| **Name of the video** | Announced to a screen reader in place of the frame the video is loaded into. The heading of the element is used where it is empty. |
| **Shape** | **Widescreen (16:9)** or **Classic (4:3)**. |
| **Poster** | The picture shown in place of the video until it is played. A file of this installation - a thumbnail fetched from the provider would be the very request this element avoids. |

Until the button is pressed the page carries the poster, a note and a link to
the source, and **no** `iframe`, no preconnect and no image of the other
site. Nothing of the video's host - not a cookie, not an entry in its logs -
reaches a visitor who does not watch it.

### What is embedded, and what is not

YouTube and Vimeo addresses are recognised in the forms a person actually
copies - the watch page, the short link, the share link, the embed link - and
are rewritten onto the host that sets no cookie in advance:
`youtube-nocookie.com`, and `player.vimeo.com` with Vimeo's own `dnt=1`.
An editor pasting the ordinary watch address does not have to know that.

**Any other address is not embedded.** The element then shows the poster and
the link to the source, with no play button - the same page a visitor without
JavaScript gets. That is deliberate and not a gap to be filled by pasting the
address into an `iframe`: the field is not a trust boundary, an
`iframe` runs the other origin's script inside the page, and a watch page
of an unknown site is a page rather than a player - most sites refuse to be
framed at all, so the reader would get an empty box and no explanation.

### Without JavaScript

The play button is not rendered at all until the theme's script has bound it.
The link to the source is always there, so the video is one press away whether
there is a script or not.

## Impact

Integrators get one new content type to grant to editor groups,
`theme_external_media`. The database analyzer adds three columns to
`tt_content`: `tx_theme_embed_url`, `tx_theme_embed_title` and
`tx_theme_embed_ratio`. The element reuses the existing `image` column for
its poster.

A site package overriding `Templates/ContentElements/` finds the template
there as `ThemeExternalMedia.html`, and the stylesheet gains the
`.theme-embed` component - see [Components](../../Components/Index.html#components). Which addresses become
an embed is decided in
`SBUERKThemeExtensionDevelopmentDataProcessingExternalMediaProcessor`;
a site package with a fourth provider overrides that class, where the whole of
that knowledge is.

The showcase page **/elements/theme/external-media** shows both shapes,
an element without a poster and one whose host is not embedded.
