From MediaWiki.org
(Redirected from Extension:Youtube)
Jump to navigation Jump to search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.svg

Release status:Extension status stable

ImplementationTemplate:Extension#type Tag, Media
DescriptionTemplate:Extension#description Allows to embed YouTube and Google Video movies, Archive.org audio and video, WeGame and Gametrailers video, Tangler forum, and GoGreenTube video
Author(s)Template:Extension#username Przemek Piotrowski
Latest versionTemplate:Extension#version 1.9.1 (2015-11-22)
MediaWikiTemplate:Extension#mediawiki 1.31+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
ExampleTemplate:Extension#example Any ShoutWiki site
Hooks usedTemplate:Extension#hook

Translate the YouTube extension if it is available at translatewiki.net

Check usage and version matrix.
Vagrant roleMediaWiki-Vagrant#Using roles youtube

The YouTube extension allows users to embed YouTube and Google Video movies, Archive.org audio and video, WeGame and Gametrailers video, Tangler forum, and GoGreenTube video.

Originally made by and for Wikia, though Wikia no longer uses this video extension.


  • Download and place the file(s) in a directory called YouTube in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'YouTube' );
  • YesY Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.


To embed a YouTube video:


where foo is the video ID from the URL. i.e. if the video's URL is https://www.youtube.com/watch?v=VyBSS48E4xI, then the embed code would be <youtube>VyBSS48E4xI</youtube>.

Other supported video services[edit]

See ShoutWiki's help page on using the YouTube extension for more information, such as using alternate, non-YouTube providers to embed content.

The YouTube extension allows also to embed videos from these services:

  • Google Video — use the <gvideo> tag
  • Archive.org audio — use the <aoaudio> tag
  • Archive.org video — use the <aovideo> tag
  • WeGame — use the <wegame> tag
  • Tangler forum — use the <tangler> tag
  • Gametrailers — use the <gtrailer> tag
  • Nicovideo — use the <nicovideo> tag
  • GoGreenTube — use the <ggtube> tag

Setting width and height[edit]


<youtube width="200" height="120">CCz1kmfqL7g</youtube>

You can change the width and height of the video box

  • Width is controlled with width="xxx", where xxx is the number of pixels. The default is 640 pixels.
  • Height is controlled in the same way with height="xxx". The default is 385 pixels.

See Wikia's old help page about this extension. It explains further details, such as how to set width and height.