FANDOM


Help icon  ContentsImage markup → Image gallery

As of version 1.4, MediaWiki supports making image galleries. This is an easy way of displaying a large number of images.

Syntax

The basic syntax of an image gallery is:

<gallery>
Image:Wiki.png
Image:Wiki.png|Caption
Image:Wiki.png
Image:Wiki.png|[[Law and Order:About|Links]] can be put in captions.
Image:Wiki.png
Image:Wiki.png|Full [[Help:Wiki markup|MediaWiki markup]]<br/>syntax may be used…
</gallery>

Which produces:

Notice that there are no brackets except for links within captions. Captions are optional. Images are separated by new lines.

As of newer MediaWiki versions it is now possible to alter the thumbnail's maximum height and width as well as how many images per row.

  • heights adjusts the maximum height, widths adjusts the maximum width of all thumbnails within a gallery
  • perrow adjusts the number of images per row.
  • caption gives the gallery a caption

This example...

<gallery heights="150" widths="150" perrow="2" caption="performing gallery features">
Image:Wiki.png|Caption
Image:Wiki.png|Caption
Image:Wiki.png|Caption
Image:Wiki.png|Caption
</gallery>

...is rendered as...

Community content is available under CC-BY-SA unless otherwise noted.