PHPackages                             nr/fieldtypeoembed - 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. nr/fieldtypeoembed

ActivePw-module[Utility &amp; Helpers](/categories/utility)

nr/fieldtypeoembed
==================

Collect and store Oembed Data

1.1.6(3y ago)692[1 issues](https://github.com/neuerituale/FieldtypeOembed/issues)[2 PRs](https://github.com/neuerituale/FieldtypeOembed/pulls)MITPHP

Since Jun 9Pushed 1y ago2 watchersCompare

[ Source](https://github.com/neuerituale/FieldtypeOembed)[ Packagist](https://packagist.org/packages/nr/fieldtypeoembed)[ Docs](https://github.com/neuerituale/FieldtypeOembed)[ RSS](/packages/nr-fieldtypeoembed/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (6)Dependencies (2)Versions (8)Used By (0)

FieldtypeOembed
===============

[](#fieldtypeoembed)

What it does
------------

[](#what-it-does)

Store, collect and update oembed data from external sources. This module uses the great PHP Library [Essence](https://github.com/essence/essence) by Félix Girault and adds some processwire magic. It is inspired by Ryan's example module FieldtypeEvents and the TextformatterOEmbed module by felixwahner. Thanks!

Features
--------

[](#features)

- Simple embedding of content via oembed endpoints and opengraph crawling
- Backend preview
- Searching in oembed data with $pages-&gt;find()
- Autoupdate with lazycron
- Support for [ProcessGraphQL](https://processwire.com/modules/process-graph-ql/) with the additional module *GraphQLFieldtypeOembed*
- Filter result with [hooks](#result-hooks)

Install
-------

[](#install)

1. Copy the files for this module to /site/modules/FieldtypeOembed/
2. Execute the following command in the /site/modules/FieldtypeOembed/ directory. ```
    composer install
    ```
3. In admin: Modules &gt; Refresh. Install Fieldtype &gt; Oembed.
4. Create a new field of type Oembed, and name it whatever you would like. In our examples we named it simply "embed".
5. Add the field to a template and edit a page using that template. Enter a (embed)-url in the field and save the page.

Install via composer
--------------------

[](#install-via-composer)

1. Execute the following command in your website root directory. ```
    composer require nr/fieldtypeoembed
    ```

Configuration
-------------

[](#configuration)

`Modules` &gt; `Configure` &gt; `FieldtypeOembed`

### Lazycron

[](#lazycron)

Set up the Lazycron schedule. The cache expiration is configurable in the field settings.

[![Lazycron](https://user-images.githubusercontent.com/11630948/116866358-8e7b6000-ac0b-11eb-8793-a5a06546ff09.png)](https://user-images.githubusercontent.com/11630948/116866358-8e7b6000-ac0b-11eb-8793-a5a06546ff09.png)

### Custom Provider for Essence

[](#custom-provider-for-essence)

You can configure your own `Oembed` or `OpenGraph` providers for Essence.
[How to add custom providers (Essence Git)](https://github.com/essence/essence#configuration)

```
{
   "getty": {
      "class": "OEmbed",
      "filter": "~gty\\.im/.+~i",
      "endpoint": "http://embed.gettyimages.com/oembed?url=:url"
   },
   "neuerituale": {
      "class": "OpenGraph",
      "filter": "~neuerituale\\.com.?~i"
   },
   "tiktok": {
      "class": "OEmbed",
      "filter": "~tiktok\\.com/.+~i",
      "endpoint": "https://www.tiktok.com/oembed?url=:url"
   },
   "InstagramOEmbed": {
      "class": "OEmbed",
      "filter": "~instagr(\\.am|am\\.com)/p/.+~i",
      "endpoint": "http://api.instagram.com/oembed?format=json&url=:url&hidecaption=true"
   },
}
```

#### You can disable all providers

[](#you-can-disable-all-providers)

```
{
	"23hq": false,
	"500px": false,
	"Animoto": false,
	"Aol": false,
	"App.net": false,
	"Bambuser": false,
	"Bandcamp": false,
	"Blip.tv": false,
	"Cacoo": false,
	"CanalPlus": false,
	"Chirb.it": false,
	"CircuitLab": false,
	"Clikthrough": false,
	"CollegeHumorOEmbed": false,
	"CollegeHumorOpenGraph": false,
	"Coub": false,
	"CrowdRanking": false,
	"DailyMile": false,
	"Dailymotion": false,
	"Deviantart": false,
	"Dipity": false,
	"Documentcloud": false,
	"Dotsub": false,
	"EdocrOEmbed": false,
	"EdocrTwitterCards": false,
	"FacebookPost": false,
	"FlickrOEmbed": false,
	"FlickrOpenGraph": false,
	"FunnyOrDie": false,
	"Gist": false,
	"Gmep": false,
	"HowCast": false,
	"Huffduffer": false,
	"Hulu": false,
	"Ifixit": false,
	"Ifttt": false,
	"Imgur": false,
	"InstagramOEmbed": false,
	"InstagramOpenGraph": false,
	"Jest": false,
	"Justin": false,
	"Kickstarter": false,
	"Meetup": false,
	"Mixcloud": false,
	"Mobypicture": false,
	"Nfb": false,
	"Official.fm": false,
	"Polldaddy": false,
	"PollEverywhere": false,
	"Prezi": false,
	"Qik": false,
	"Rdio": false,
	"Revision3": false,
	"Roomshare": false,
	"Sapo": false,
	"Screenr": false,
	"Scribd": false,
	"Shoudio": false,
	"Sketchfab": false,
	"SlideShare": false,
	"SoundCloud": false,
	"SpeakerDeck": false,
	"Spotify": false,
	"TedOEmbed": false,
	"TedOpenGraph": false,
	"Twitter": false,
	"Ustream": false,
	"Vhx": false,
	"Viddler": false,
	"Videojug": false,
	"Vimeo": false,
	"Vine": false,
	"Wistia": false,
	"WordPress": false,
	"Yfrog": false,
	"Youtube": false,
	"FacebookVideo": false
}
```

### Field settings

[](#field-settings)

`Fields` &gt; `embed` &gt; `Details`The FieldtypeOembed extends the FieldtypeURL (core). In addition to these settings, you can also set the cache time for the oembed data. The lazycron will update the data.

[![Fieldsettings](https://user-images.githubusercontent.com/11630948/116866356-8de2c980-ac0b-11eb-8d9f-dbcc9d751904.png)](https://user-images.githubusercontent.com/11630948/116866356-8de2c980-ac0b-11eb-8d9f-dbcc9d751904.png)

### Field preview

[](#field-preview)

[![Fieldpreview](https://user-images.githubusercontent.com/11630948/116866352-8b806f80-ac0b-11eb-8842-d0f005b36354.png)](https://user-images.githubusercontent.com/11630948/116866352-8b806f80-ac0b-11eb-8842-d0f005b36354.png)

API
---

[](#api)

### Returns the Oembed object (WireData)

[](#returns-the-oembed-object-wiredata)

```
/** @var \ProcessWire\Oembed */
$page->embed
```

### Check emptiness

[](#check-emptiness)

```
/** @var boolean **/
$page->embed->empty
```

### Render

[](#render)

```
/** @var string return the html from oembed result */
"$page->embed"
$page->embed->html
```

### Result Hooks

[](#result-hooks)

If you want to filter or change the results of the oembed provider, use the hookable methods e.g. `___filterProps()`.

In this example we want to get the high resolution version of the thumbnail of a YouTube video.

```
// some where in your ready.php
// Replace hqdefault preview thumbnail with maxresdefault

$this->addHook('FieldtypeOembed::filterProps', function (HookEvent $event) {
   $propsArray = $event->arguments(0);
   if(is_array($propsArray) && $propsArray['providerName'] === 'YouTube') {
      $maxResultUrl = str_replace('/hqdefault.jpg', '/maxresdefault.jpg', $propsArray['thumbnailUrl']);
      // test max result url
      if((new WireHttp())->status($maxResultUrl) === 200) $propsArray['thumbnailUrl'] = $maxResultUrl;
      $event->return = $propsArray;
   }
});
```

The Oembed object
-----------------

[](#the-oembed-object)

```
// print_r($page->embed);

ProcessWire\Oembed Object
(
    [data] => Array
        (
            [empty] => false
            [url] => http://www.youtube.com/watch?v=dQw4w9WgXcQ
            [html] => '...'
            [type] => video
            [title] => Rick Astley - Never Gonna Give You Up (Video)
            [width] => 200
            [height] => 113
            [version] => 1.0
            [authorUrl] => https://www.youtube.com/user/RickAstleyVEVO
            [authorName] => RickAstleyVEVO
            [providerUrl] => https://www.youtube.com/
            [providerName] => YouTube
            [thumbnailUrl] => https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg
            [thumbnailWidth] => 480
            [thumbnailHeight] => 360
        )
)
```

Find pages
----------

[](#find-pages)

You can query the oembed result fields

```
$pages->find('embed.providerName=YouTube');
$pages->find('embed.width>=200');
```

GraphQLFieldtypeOembed
----------------------

[](#graphqlfieldtypeoembed)

You can query this field over ProcessGraphQL.
Please install the additional module `GraphQLFieldtypeOembed`.

### Field definitions

[](#field-definitions)

```
myfield {
   empty: Boolean
   title: String
   authorName: String
   authorUrl: String
   type: String
   height: Int
   width: Int
   providerName: String
   providerUrl: String
   thumbnailHeight: Int
   thumbnailWidth: Int
   thumbnailUrl: String
   html: String
   url: String
}

```

Todos
-----

[](#todos)

- Remove extend urlfield!
- remove \_oembed helper construct (dirty)

###  Health Score

28

—

LowBetter than 51% of packages

Maintenance23

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95% 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 ~147 days

Recently: every ~172 days

Total

6

Last Release

1155d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61a0639a232837322b461271ef1775f769c3ff4e289141c9ee5bdcebc8f29835?d=identicon)[nr](/maintainers/nr)

---

Top Contributors

[![julianwinkel](https://avatars.githubusercontent.com/u/11630948?v=4)](https://github.com/julianwinkel "julianwinkel (19 commits)")[![bi11n3r](https://avatars.githubusercontent.com/u/31960287?v=4)](https://github.com/bi11n3r "bi11n3r (1 commits)")

---

Tags

processwiremoduleoembed

### Embed Badge

![Health badge](/badges/nr-fieldtypeoembed/health.svg)

```
[![Health](https://phpackages.com/badges/nr-fieldtypeoembed/health.svg)](https://phpackages.com/packages/nr-fieldtypeoembed)
```

PHPackages © 2026

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