Skip to main content

embed content from oEmbed-providers and make your Plone site being an oembed provider

Project description


This addon integrate oembed into Plone. You can find a demo at

oEmbed official documentation: http://

You have to know this addon try to go beyond already supported website and with as many providers as possible without third party services.

oembed provider

Your site will become an oembed provider using @@oembed view as an endpoint:

URL Scheme:*
API endpoint:
Supports discovery via <link> tags

This addon use archetypes getPrimaryField to get the most representative field of your content type and then build information on how to embed this content

To change this behavior you can override the view for specific context:


from collective.oembed.provider.
class OEmbedProvider(OEmbedProvider):
    def add_context_info(self, ob, site):
        self.embed['type'] = 'rich'

oembed client

This addon provide an integration of jquery.oembed plugin. Because there are many fork you have to choose the one you will use. The official plugin has been integrated to plone throw the addon collective.js.oembed

The oembed client is integrated using a viewlet that is not activated by default. You have to activate it throw the controlpanel. It is configured that way:

<script type="text/javascript">
  jqueryOmebedSettings = {...} //extracted from the controlpanel
<script type="text/javascript">
        $(document).ready(function() {


A consumer is availabe throw a utility:

>>> url = ""
>>> consumer = component.getUtility(collective.oembed.interfaces.IConsumer)
>>> consumer.get_data(url, maxwidth=300, maxheight=None, format='json')

There is also a @@collective.oembed.consumer view, which can take params throw attributes:

>>> consumer_view = component.queryMultiAdapter((self.context,self.request),
...                                 name=u'collective.oembed.consumer')
>>> consumer_view._url = url
>>> consumer_view.embed_auto()
<div class="oembed-wrapper oembed-video">...</div>

This addon can use service. You can set the api key in the control panel or install and configure collective.embedly, this addon will use the configuration provided by this one.

Providers is activated only if you have added an api_key or configured collective.embedly. The addon provide native support for the following services:

External providers:

Video providers:

Photo providers:

Rich providers:

Proxy OEmbed Endpoint

This addon provide consumer and provider. Both can be used at the same time in the proxy oembed endpoint. It means you can ask your site how to display an URL what ever it comes from the site itself or from outside.

Addon design (targeted to 2.0)

The internal code has been completly redone on 2.0


  • code easier to understand
  • less components
  • performance optimization

The provided integration use only json throw ajax request.

We have one main view which achieve the job: @@proxy-oembed-provider

This one use a ram cache with a cache-key based on: * url + max-width + max-height * 1 hour (in case distant html has changed)

There is a structure key/value with hostname as keys and low level consumer name as values which are instanciated when needed (lazy loading) so it use less memory.


Make the global structure configurable to:

  • blacklist some hostname throw portal_registry
  • add new key/value hostname/consumername throw portal_registry
  • override existing value throw portal_registry







2.0a1 (2013-01-29)

  • can use links inside div.oembed too since tinymce don’t apply styles to “a” well [djay]

1.2.5 (2013-01-07)

  • Fix soundcloud provider which can use https
  • Add oembed tile if is installed
  • Add screenr provider
  • Add test view endpoints_test_view only available with provided buildout
  • Refactor tests to use assertX instead of failUnless
  • Add responsive behavior to img, embed and object tag.
  • Add support (iphone app)
  • Add support (occipital)
  • Add support

1.2.4 (2013-01-02)

  • Add “proxy-oembed-provider” to make your Plone an oembed proxy consumer and provider
  • Add twitteruser (api2embed) and activate api2embed everywhere
  • Improve local oembed support for archetypes using primary field
  • Update returned html code to make it responsive (taken from fitVids.js)

1.2.3 (2012-08-24)

  • Add support for Soundcloud. [aleGpereira]

1.2.2 (2012-07-10)

  • Make GoogleMaps working with both: maps and mymaps
  • PEP8

1.2.1 (2012-04-25)

  • Fix offline mode (when working without internet)

1.2 (2012-03-15)

  • add Plone 4.0.x support

1.1 (2012-02-22)

  • Add collective.oembed.url2embed browser view component
  • Add collective.oembed.superconsumer browser view component
  • Add GoogleMaps,, google calendar, google docs, scribd support
  • Support shorted url with,,,,,

1.0 (2012-01-13)

  • Fix regex for 5min endpoint.
  • Handle more error: HTTPError, OEmbedError
  • Add url2embed support
  • Add oembed support for,, Official.FM, [raphigaziano]
  • Add url2embed support for picasaweb [raphigaziano]

1.0a (2012-01-02)

  • Initial release

Project details

Release history Release notifications

History Node


History Node


History Node


History Node


History Node


This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date (98.6 kB) Copy SHA256 hash SHA256 Source None Jan 29, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page