MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
Release status: unmaintained
Implementation Tag
Description Allows to create a gallery of all images in a category
Author(s) Nathan Larson (Leucostictetalk)
Latest version 1.0.1 (2013-10-29)
MediaWiki 1.21+
PHP 5+
Database changes No
License GNU General Public License 2.0
* ‎<categorygallery>

Check usage and version matrix.

The CategoryGallery extension implements a <categorygallery> tag creating a gallery of all images in a category.


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


If you want to show a gallery of all images in category Foo, do this:

<categorygallery cat="foo"/>

You can abbreviate it as catgallery:

<catgallery cat="foo"/>

The categorygallery tag itself takes several additional parameters, specified as attribute name-value pairs:

<catgallery {parameters}/>
  • caption="{caption}": (caption text between double quotes for more than a word) sets a caption centered atop the gallery.
  • widths={width}px: sets the widths of the images, default 120px. Note the plural, widths
  • heights={heights}px: sets the (max) heights of the images.
  • perrow={integer}: sets the number of images per row. 0 means automatically adjust based on width of screen
  • showfilename={anything}: Show the filenames of the images in the individual captions for each image (1.17+)
  • bdpcaption={property}: Show the metadata of the images in the individual captions for each image (requires Extension:BedellPenDragon)

See alsoEdit