MediaWiki extensions manual
Release status: stable
Implementation Tag
Description Displays a random image from a given category
Latest version 1.4.0 (2020-05-24)
MediaWiki 1.39+
License GNU General Public License 2.0 or later
Quarterly downloads 8 (Ranked 141st)
Translate the RandomImageByCategory extension if it is available at translatewiki.net

The RandomImageByCategory extension displays a random image from the given category or categories.

Installation edit

  • Download and move the extracted RandomImageByCategory folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/RandomImageByCategory
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'RandomImageByCategory' );
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Usage edit

Supported parameters are width, limit and categories.

<randomimagebycategory categories="Watermelons"/>
<randomimagebycategory width="200" categories="Featured Image"/>

See also edit