Help:Galleries and slideshows/wikitext
This page describes how to use and customize photo galleries, slideshows, and sliders using wikitext. This page is for advanced users.
See also: simpler instructions.
Videos are also supported for galleries and sliders.
Gallery
A gallery is a collection of thumbnail images appearing as tiles on the page.

Added by Dr. Ball, M.D.Basic Example
Here is the basic gallery code:
<gallery> Example1.png Example2.png Example3.png </gallery>
Example with Variations
The following code would produce a more complex gallery:
<gallery> Example1.png Example2.png|Captioned Example3.png|'''[[Help:Wikitext|Wikitext]]''' can be used in captions. Example4.png|link=Help:Contents|This photo links to [[Help:Contents]]. </gallery>
In this example...
- The first item is an image only.
- The second item is an image with a caption.
- The third item is an image with a caption that includes wikitext
- The fourth item is an image that is linked to a wiki page, followed by a caption.
Slideshow
A slideshow is an image module that displays one image at a time, and automatically rotates through the included images.

Added by Dr. Ball, M.D.Basic Example
Here is the basic slideshow code:
<gallery type="slideshow"> Example1.png Example2.png Example3.png </gallery>
Example with Variations
The following code would produce a more complex slideshow:
<gallery type="slideshow"> Example1.png Example2.png|Captioned Example3.png|'''[[Help:Wikitext|Wikitext]]''' can be used in gallery captions. Example4.png|Clicking photo takes you to [[Help:Contents]].|link=Help:Contents|linktext=Help:Contents </gallery>
In this example...
- The first item is an image only.
- The second item is an image with a caption.
- The third item is an image with a caption that includes wikitext
- The fourth item is an image that is linked to a wiki page. It also includes a caption, as well as a description of the link.
Slider
A slider is an image module that spans the full width of the page and automatically scrolls through up to four images.

Added by Dr. Ball, M.D.Tip: For best results, use images that are exactly 670 x 360px.
Basic Example
Here is the basic slider code:
<gallery type="slider"> Example1.png Example2.png Example3.png </gallery>
Example with Variations
The following code would produce a more complex slider:
<gallery type="slider"> Example1.png Example2.png|Example Two Example3.png|Example Three|linktext=Great links Example4.png|Example Four|link=Help:Contents|linktext=Interesting Pages </gallery>
In this example...
- The first item is an image only.
- The second item is an image with a title.
- The third item is an image with a title and a subtitle.
- The fourth item is an image that is linked to a wiki page. It also includes a title and a subtitle.
Wikitext and Options
The following reference tables address the customization options for each of these three image modules.
Gallery
| Type | Wikitext options | Default |
|---|---|---|
| Layout options | ||
| Photo width (max) | widths=[number of pixels] | 200px |
| Number of columns | columns=[number of columns] or perrow=[number of columns] | Fit to page* |
| Gallery position | position=[left/center/right] | Left |
| Photo spacing | spacing=[small/medium/large] | Med |
| Photo orientation and cropping | orientation=[none/landscape/portrait/square] | None |
| Caption options | ||
| Caption position | captionposition=[within/below] | Below |
| Caption alignment | captionalign=[left/center/right] | Left |
| Caption size | captionsize=[small/medium/large] | Medium |
| Caption color | captiontextcolor=[hex color code] | Article text color |
| Border options | ||
| Border thickness | bordersize=[none/small/medium/large] | Small |
| Border color | bordercolor=[hex color code] | Accent theme color |
| Other | ||
| Hide "add photo" button | hideaddbutton=true | Not hidden |
| Gallery caption | caption=[text displayed] | No caption |
| The photos | ||
| Photos are separated by newlines. | No photo | |
| Captions are optional. Brackets are used only for adding links within captions. | No caption | |
Links are optional, and use link= | No link | |
* If columns isn't specified, the number of photos displayed per row will adjust automatically according to the size of the browser window.
Slideshow
| Type | Wikitext options | Default |
|---|---|---|
| Layout options | ||
| Photo width (max) | widths=[number of pixels] | 300px |
| Cropping | crop=[true] | No cropping |
| Show recent uploads | showrecentuploads=[true] | False |
| Slideshow position | position=[left/center/right] | Right |
| Other | ||
| Hide "add photo" button | hideaddbutton=true | Not hidden |
| Slideshow caption | caption=[text displayed] | No caption |
| The photos | ||
| Photos are separated by newlines. | No photo | |
| Captions are optional. Brackets are used only for adding links within captions. | No caption | |
Links are optional, and use link= | No link | |
Slider
| Type | Wikitext options | Default |
|---|---|---|
| Layout options | ||
| Orientation | orientation=[left/right] | left |
| The photos | ||
| Photos are separated by newlines. | No photo | |
| Titles are optional. | No caption | |
Links are optional, and use link= | No link | |
Subtitles are optional, and use linktext= | No link | |
See also
- Help:Galleries, Slideshows, and_Sliders/wikitext/examples - view the examples used in the images on this page
- Help:Galleries, Slideshows, and_Sliders - see instructions for using these features in the Visual Editor
- Help:Editing - about our editor