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
acceptto restrict).
Example output
{ "hero_media": "https://cdn.example.com/hero.jpg" }
This is how it looks in the builder.