Skip to main content

media

Schema

{ "hero_media": { "type": "media", "label": "Image or Video", "default": "" } }

Nunjucks example

{% if widget.data.hero_media %}<img src="{{ widget.data.hero_media }}" alt="">{% endif %}

Accepts image or video (use accept to restrict).

Example output

{ "hero_media": "https://cdn.example.com/hero.jpg" }

media in builder

This is how it looks in the builder.