TIP OEmbedPlugin is not installed on Foswiki.org.


Easy embedding of third party content

oEmbed is a format for allowing an embedded representation of a URL on third party sites. The simple API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource, without having to parse the resource directly.

All you need to do to embed material from one of the supported providers is to add a link to it. The plugin will contact the provider and use the appropriate code to add it to the page, e.g. add an iframe for videos and the like.

Supported providers

  1. 23HQ
  2. Alpha App Net
  3. Amazon (embed.ly)
  4. AmChart Live Editor
  5. Animoto
  6. On Aol
  7. AudioSnaps
  8. Blib.tv
  9. Cacoo
  10. ChartBlocks
  11. Chirbit
  12. CircuitLab
  13. Clipfish (embed.ly)
  14. Clyp
  15. CollegeHumor
  16. Coub
  17. CrowdRanking
  18. DailyMile
  19. DailyMotion
  20. DeviantArt
  21. Dipity
  22. Dotsub
  23. Edocr
  24. Facebook (video)
  25. Flickr
  26. Foursquare (embed.ly)
  27. FunnyOrDie
  28. Geograph Britain and Ireland
  29. Geograph Channel Islands
  30. Geograph Germany
  31. GMEP
  32. Getty Images
  33. Google Maps (embed.ly)
  34. HuffDuffer
  35. Hulu
  36. IFTTT
  37. IMDB (embed.ly)
  38. Infogram
  39. Instagram
  40. Kickstarter
  41. Meetup
  42. MixCloud
  43. MobyPicture
  44. Nfb
  45. OfficialFM
  46. PollEverywhere
  47. PollyDaddy
  48. Portfolium
  49. Quiz.biz
  50. Rdio
  51. ReverbNation
  52. Roomshare
  53. SapoVideos
  54. Screencast (embed.ly)
  55. Screenr
  56. Scribd
  57. ShortNote
  58. Shoudio
  59. Sketchfab
  60. SlideShare
  61. SoundCloud
  62. SpeakerDeck
  63. Ted
  64. Twitpic (embed.ly)
  65. Ustream
  66. Viddler
  67. Viddler
  68. VideoJug
  69. Vimeo
  70. Vimeon
  71. Vine
  72. Washington Post (embed.ly)
  73. WordPress
  74. YFrog
  75. Youtube

A lot of providers are available via http://embed.ly. However, you'll have to register to get an api-key. Some of the listed providers have already been added to this plugin, yet not all.


Syntax: %EMBED{"url" [width="..." height="..."]}% (or %OEMBED{...}%)

  • url: an external link to the resource to be embedded
  • width, height: optional maximum values for the image/video/... being embedded (note: not all providers properly implement these parameters)
  • format: a format string to implement a custom renderer
  • template: the name of a template defined in oembed.tmpl; known templates shipped with OEmbedPlugin are "article" (todo add more)
  • <custom_key>: any custom key="value" pair may be defined and made use of in the format (or template) using $custom_key to expand it; these have higher precendence than the default values submitted by the oembed provider; for example use a custom thumbnail_width="100" parameter to override the default width.

The keys in the json submitted from the oembed provider can be used in a format string (or a template definition). Some well-known keys are:

  • $author_name
  • $author_url
  • $descriptio
  • $html
  • $provider_name
  • $provider_url
  • $thumbnail_height
  • $thumbnail_url
  • $thumbnail_width
  • $title
  • $type
  • $url
  • $web_page

In addition all standard format tokens can be used ($percnt, $dollar, $nop, etc).

See the oembed.tmpl file on how to use them.


Washington Post


%EMBED{"http://www.washingtonpost.com/investigations/us-intelligence-mining-data-from-nine-us-internet-companies-in-broad-secret-program/2013/06/06/3a0c0da8-cebf-11e2-8845-d970ccb04497_story.html" template="article" thumbnail_width="100" }%


%EMBED{"http://www.youtube.com/watch?v=O8e8Ttfz-pY" width="600"}%

%EMBED{"http://www.youtube.com/watch?v=O8e8Ttfz-pY" width="600"}%


%EMBED{"http://soundcloud.com/safia-music/listen-to-soul-listen-to-blues" width="600"}%

%EMBED{"http://soundcloud.com/safia-music/listen-to-soul-listen-to-blues" width="600"}%


%EMBED{"http://www.flickr.com/photos/onement/1239189689/" height="400"}%
%EMBED{"http://www.flickr.com/photos/onement/1239189689/" height="400"}%

More examples

%EMBED{"http://www.scribd.com/doc/17896323/Indian-Automobile-industryPEST" width="600"}%
  format="<a href='$url'><img src='$url' width='$width' /></a> %BR% by <a href='$author_url'>$author_name</a>"
%EMBED{"http://www.23hq.com/brinjal/photo/13305970" width="500"}%

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. "Extensions Operation and Maintenance" Tab -> "Install, Update or Remove extensions" Tab. Click the "Search for Extensions" button. Enter part of the extension name or description and press search. Select the desired extension(s) and click install. If an extension is already installed, it will not show up in the search results.

You can also install from the shell by running the extension installer as the web server user: (Be sure to run as the webserver user, not as root!)
cd /path/to/foswiki
perl tools/extension_installer <NameOfExtension> install

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See https://foswiki.org/Support/ManuallyInstallingExtensions for more help.



Change History

25 Sep 2017 added clearCache REST interface for local cache maintenance
17 Nov 2016 more providers; converted Web::oEmbed from Any::Moose to Moo
07 Oct 2015 multiple providers went in & out
16 Mar 2015 added Infogram
23 Feb 2015 added a few more provider
16 Dec 2014 have an image preview for vimeo and youtube and only embed the real video when clicking on it; added Vine
25 Sep 2014 added caching
24 Sep 2014 added a custom renderer for youtube videos
29 Aug 2014 removed my opera, qirk and urtak; use https whereever possible
01 Nov 2013 added more providers
30 Aug 2013 added more providers
24 Jun 2013 added format, template and custom params; added a few more providers

Topic attachments
I Attachment Action Size Date Who Comment
OEmbedPlugin.md5md5 OEmbedPlugin.md5 manage 159 bytes 25 Sep 2017 - 11:22 MichaelDaum  
OEmbedPlugin.sha1sha1 OEmbedPlugin.sha1 manage 183 bytes 25 Sep 2017 - 11:22 MichaelDaum  
OEmbedPlugin.tgztgz OEmbedPlugin.tgz manage 57 K 25 Sep 2017 - 11:21 MichaelDaum  
OEmbedPlugin.zipzip OEmbedPlugin.zip manage 63 K 25 Sep 2017 - 11:21 MichaelDaum  
OEmbedPlugin_installerEXT OEmbedPlugin_installer manage 5 K 25 Sep 2017 - 11:22 MichaelDaum  
Topic revision: r13 - 25 Sep 2017, MichaelDaum - This page was cached on 14 Jan 2020 - 21:01.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy