PHPackages                             daun/statamic-embed-fieldtype - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. daun/statamic-embed-fieldtype

ActiveStatamic-addon[Utility &amp; Helpers](/categories/utility)

daun/statamic-embed-fieldtype
=============================

Fieldtype for embedding and previewing external content in Statamic

1.3.0(4mo ago)0108[1 issues](https://github.com/daun/statamic-embed-fieldtype/issues)MITPHPPHP ^8.2

Since Dec 2Pushed 4mo agoCompare

[ Source](https://github.com/daun/statamic-embed-fieldtype)[ Packagist](https://packagist.org/packages/daun/statamic-embed-fieldtype)[ Docs](https://github.com/daun/statamic-embed-fieldtype)[ RSS](/packages/daun-statamic-embed-fieldtype/feed)WikiDiscussions main Synced yesterday

READMEChangelog (5)Dependencies (8)Versions (9)Used By (0)

Statamic Embed Fieldtype
========================

[](#statamic-embed-fieldtype)

Fieldtype for embedding and previewing external content.

[![Example embed field](art/field-podcast.png)](art/field-podcast.png)

Features
--------

[](#features)

- Augment URLs with embed data: iframe, thumbnail, title, description
- Live preview of embedded content in the control panel
- Powered by the [Embed](https://github.com/php-embed/Embed) library and extensible with custom adapters
- Supports any provider with oEmbed endpoint or Open Graph meta tags

Vs. the Built-In Video Fieldtype
--------------------------------

[](#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](https://statamic.dev/fieldtypes/video). 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

Installation
------------

[](#installation)

Install the addon via Composer:

```
composer require daun/statamic-embed-fieldtype
```

Fieldtype
---------

[](#fieldtype)

The addon ships with an `embed` fieldtype that accepts a url and shows a preview in the editor.

```
fields:
  -
    handle: embed
    field:
      type: embed
      display: Embed
```

Frontend
--------

[](#frontend)

The fieldtype augments the url to an array of embed data. The following example will render a simple embed card with either an iframe (if available) or a preview image.

```
{{ if embed:url }}

    {{ if embed:code }}

        {{ embed:code:html }}

    {{ elseif embed:image }}

    {{ /if }}
    {{ if embed:title }}

            {{ embed:title }}

        {{ if embed:description || embed:author:name }}
          {{ embed:description ?? embed:author:name }}
        {{ /if }}
        {{ if embed:provider:url }}
          {{ embed:provider:url | replace('https://', '') }}
        {{ /if }}

    {{ /if }}

{{ /if }}
```

### Unaugmented URL

[](#unaugmented-url)

If you want to use the raw url without augmentation, you can access it via `embed:url`. To turn off augmentation completely, you can set the field config `augment_to_embed_data` to `false`. This will return the url as-is in all frontend contexts.

```
fields:
  -
    handle: embed
    field:
      type: embed
      display: Embed
+     augment_to_embed_data: false
```

Extending the Embed Library
---------------------------

[](#extending-the-embed-library)

The addon uses the [Embed](https://github.com/php-embed/Embed) library under the hood, which supports a variety of providers out of the box: YouTube, Vimeo, Instagram, Flickr, etc. You can customize the library instance and settings and also create custom adapters for unsupported providers by registering a resolving callback in your service provider. See [Extending Embed](https://github.com/php-embed/Embed?tab=readme-ov-file#extending-embed)for details and examples.

```
namespace App\Providers;

use Embed\Embed;

class AppServiceProvider extends ServiceProvider
{
    public function register()
    {
        $this->app->afterResolving(Embed::class, function (Embed $embed) {
            $embed->getExtractorFactory()->addAdapter('mysite.com', MySite::class);
            $embed->setSettings([
                'instagram:token' => '12345678',
                'twitter:token' => 'abcdefgh',
            ]);
        });
    }
}
```

License
-------

[](#license)

[MIT](https://opensource.org/licenses/MIT)

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance74

Regular maintenance activity

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~18 days

Total

5

Last Release

140d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/31ac2b3787ded290b6bac87b937abf4f267483e4da64731bfb256a942bb669ca?d=identicon)[daun](/maintainers/daun)

---

Top Contributors

[![daun](https://avatars.githubusercontent.com/u/22225348?v=4)](https://github.com/daun "daun (58 commits)")

---

Tags

embedstatamicstatamic-addonembedstatamicfieldtype

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/daun-statamic-embed-fieldtype/health.svg)

```
[![Health](https://phpackages.com/badges/daun-statamic-embed-fieldtype/health.svg)](https://phpackages.com/packages/daun-statamic-embed-fieldtype)
```

###  Alternatives

[statamic/seo-pro

68516.6k](/packages/statamic-seo-pro)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

23111.5k14](/packages/marcorieser-statamic-livewire)[withcandour/aardvark-seo

Save time and get your Statamic site to rank better with the SEO addon for Statamic.

15133.0k](/packages/withcandour-aardvark-seo)[aerni/livewire-forms

A Statamic forms framework powered by Laravel Livewire

2915.1k](/packages/aerni-livewire-forms)[mitydigital/feedamic

A fully-featured RSS and Atom feed generator for Statamic.

1075.6k](/packages/mitydigital-feedamic)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
