PHPackages                             supercool/fetch - 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. supercool/fetch

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

supercool/fetch
===============

A field type to embed video for Craft CMS

4.0.1(1y ago)028.9k↓18.9%MITPHP

Since Aug 10Pushed 9mo ago3 watchersCompare

[ Source](https://github.com/supercool/fetch)[ Packagist](https://packagist.org/packages/supercool/fetch)[ RSS](/packages/supercool-fetch/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (1)Versions (9)Used By (0)

Fetch plugin for Craft CMS 3.x
==============================

[](#fetch-plugin-for-craft-cms-3x)

A field type to embed videos for Craft CMS

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.0.0 or later.

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

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require supercool/fetch

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Fetch.

Usage
-----

[](#usage)

Supported providers (links taken at random from site for example purposes):

- Vimeo - Videos (e.g )
- Twitter - Tweets (e.g )
- Youtube - Videos (e.g )
- Flickr - Pictures (e.g )
- Soundcloud - Audio (e.g )
- Instagram - Posts, NOT STORIES (e.g )

### Settings

[](#settings)

#### Plugin

[](#plugin)

"validateUrlsOnSave" - Lightswitch - When disabled, elements will be able to save even if the link is invalid, or the service is non-responsive. this can be used in the case of another service issue, similar to when linode was blacklisted by youtube.

#### Field

[](#field)

Each available provider will have a lightswitch that allows you to enable/disable them for the field. This will default to enabled.

### Twig

[](#twig)

If the field is not populated, it will return either null or an empty string.

If the field is populated and has no issues, it will return a FetchModel (detailed below)

If the field is populated and has errors getting the embed, it will return a FetchModel containing no data

#### FetchModel

[](#fetchmodel)

Available methods:

```
{{ field.success }}
or
{{ field.getSuccess() }}

```

Returns a boolean, false if there were any errors fetching the embed, true if there weren't

---

```
{{ field.errorMessage }}
or
{{ field.getErrorMessage() }}

```

If the embed fetch was unsuccessful, returns the error message, else returns null

---

```
{{ field.twig }}
or
{{ field.getTwig() }}

```

Returns the twig for the embed, will be an empty string if there was an error fetching the embed

---

```
{{ field.html }}
or
{{ field.getHtml() }}

```

Identical to `.twig / .getTwig()`, but returns the markup as html rather than twig\_markup

---

```
{{ field.provider }}
or
{{ field.getProvider() }}

```

Returns the provider identified for the url, in lowercase (e.g youtube), or null if there was an error

---

```
{{ field.object }}
or
{{ field.getObject() }}

```

Returns the data received from the oembed api, or null if there was an error.

This data will vary from api to api, and can best be found by looking at the relevant api docs. e.g  for instagram.

---

Brought to you by [Supercool Ltd](http://www.supercooldesign.co.uk/)

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance47

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~458 days

Recently: every ~520 days

Total

6

Last Release

588d ago

Major Versions

1.0.3 → 4.0.02023-09-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/a2e814e34ae462e254dfcf16887de782be93f37206262aa80e978bf42dc62915?d=identicon)[supercool](/maintainers/supercool)

---

Top Contributors

[![Nav33d](https://avatars.githubusercontent.com/u/4228466?v=4)](https://github.com/Nav33d "Nav33d (4 commits)")[![jamie-s-white](https://avatars.githubusercontent.com/u/137078049?v=4)](https://github.com/jamie-s-white "jamie-s-white (3 commits)")[![NickThompson1993](https://avatars.githubusercontent.com/u/43541207?v=4)](https://github.com/NickThompson1993 "NickThompson1993 (1 commits)")

---

Tags

cmsCraftcraftcmscraft-pluginfetchcraftcms3supercool

### Embed Badge

![Health badge](/badges/supercool-fetch/health.svg)

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

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k69](/packages/verbb-formie)[verbb/comments

Add comments to your site.

13753.9k](/packages/verbb-comments)[verbb/navigation

Create navigation menus for your site.

92705.0k18](/packages/verbb-navigation)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)[verbb/workflow

Enforce multi-step review processes for creating entries.

138124.1k1](/packages/verbb-workflow)

PHPackages © 2026

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