Search by

daun / statamic-embed-fieldtype

daun

Fieldtype for embedding and previewing external content in Statamic

Package info

github.com/daun/statamic-embed-fieldtype

Type:statamic-addon

pkg:composer/daun/statamic-embed-fieldtype

Statistics

Installs: 637

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.5.0 2026-11-19 13:22 UTC

This package is auto-updated.

Last update: 2026-11-19 13:23:36 UTC


README

Fieldtype for embedding and previewing external content.

Example embed field

Features

  • Augment URLs with embed data: iframe, thumbnail, title, description
  • Live preview of embedded content in the control panel
  • Powered by the Embed library and extensible with custom adapters
  • Supports any provider with oEmbed endpoint or Open Graph meta tags
  • Site-wide list of embed providers for cookie banners and consent gates

Vs. the Built-In Video Fieldtype

If you need to embed videos from YouTube and Vimeo, you should probably stick with Statamic's built-in video fieldtype. It comes with less complexity as it doesn't need to fetch the metadata or embed codes.

The fieldtype of this addon becomes useful if you need:

  • Other providers and content types like audio players, social media posts, etc
  • Ready-to-render html for embedding the content in an iframe
  • Additional metadata like title, description, thumbnail, etc
  • A list of all used providers for global consent gates

Quick Start

  1. Install using composer require daun/statamic-embed-fieldtype
  2. Add an embed field to your blueprint
  3. Render the embed using the field name in your views
<article>
  {{ if embed:code }}
    {{ embed:code:html }}
  {{ elseif embed:image }}
    <img src="{{ embed:image:url }}">
  {{ /if }}
  <a href="{{ embed:url }}">{{ embed:title }}</a>
  <p>{{ embed:author:name }} ยท {{ embed:provider:name }}</p>
</article>

Documentation

Read the documentation for a detailed guide.

License

MIT