Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
reganlawton v1.1.6
- Caching is now a field you enable in new settings area.
Latest commit 94f7f02 Apr 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
resources/img Initial release Nov 18, 2018
src v1.1.6 Apr 22, 2019
.gitignore Initial release Nov 18, 2018
CHANGELOG.md v1.1.6 Apr 22, 2019
LICENSE.md Initial release Nov 18, 2018
README.md
composer.json v1.1.6 Apr 22, 2019

README.md

oEmbed plugin for Craft CMS 3.x

oEmbed

A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.

Requirements

This plugin requires Craft CMS 3.0.0-beta.23 or later.

If use are looking for CraftCMS 2.5 support use previous project version 1.0.4 which is the latest release for CraftCMS 2.5.

Installing

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 wrav/oembed
    
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for oEmbed.

Using oEmbed

To use simply call one of the following methods on your field type

{{ entry.field.valid }} 
{{ entry.field.render }}
{{ entry.field.embed }} 
{{ entry.field.media }}

We also provide option to use as a Twig variable

{{ craft.oembed.valid(url, options) }}
{{ craft.oembed.render(url, options) }}
{% set embed = craft.oembed.embed(url, options) %}
{% set media = craft.oembed.media(url, options) %}

You can access additional media details using the examples below.

entry.field.media.title
entry.field.media.description
entry.field.media.url
entry.field.media.type
entry.field.media.tags
entry.field.media.images
entry.field.media.image
entry.field.media.imageWidth
entry.field.media.imageHeight
entry.field.media.code
entry.field.media.width
entry.field.media.height
entry.field.media.aspectRatio
entry.field.media.authorName
entry.field.media.authorUrl
entry.field.media.providerName
entry.field.media.providerUrl
entry.field.media.providerIcons
entry.field.media.providerIcon
entry.field.media.publishedDate
entry.field.media.license
entry.field.media.linkedData
entry.field.media.feeds

Additional Embed information can be found here

Credits

Original built while working at HutSix I've since been granted permission to continue development here.

Change Log

Changes can be viewed here

Support

Get in touch via email or by creating a Github issue

You can’t perform that action at this time.