daun / statamic-embed-fieldtype
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
1.5.0
2026-11-19 13:22 UTC
Requires
- php: ^8.2
- embed/embed: ^4.4
- statamic/cms: ^6.0
Requires (Dev)
- larastan/larastan: ^2.9 || ^3.0
- laravel/pint: ^1.14
- mockery/mockery: ^1.6
- orchestra/testbench: ^9.5 || ^10.0
- pestphp/pest: ^3.3
- pestphp/pest-plugin-laravel: ^3.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Fieldtype for embedding and previewing external content.
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
- Install using
composer require daun/statamic-embed-fieldtype - Add an
embedfield to your blueprint - 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.
