Template:Multiple image/doc

This template creates a box with two to ten images arranged vertically or horizontally with captions for the entire box and/or for each images.

With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.

Syntax and parameters


Examples






with background color


with links (link[n])


using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting ). To display them vertically, i.e. as a column, set (see right).

to match image heights

 * Decide on a total width for all the images, say 320px
 * Examine the individual image pages to obtain the full resolution. For example:
 * File:Donkey 1 arp 750px.jpg shows "Donkey_1_arp_750px.jpg (750 × 536 pixels, file size: 125 KB, MIME type: image/jpeg)"
 * File:Rainbow trout.png shows "Rainbow_trout.png (300 × 300 pixels, file size: 158 KB, MIME type: image/png)"
 * Specify the full width and height for each image, of the form:
 * width1 height1 width2 height2
 * Set the total width using total_width



Multiple rows
To create an array of images, with multiple rows, use perrow. The value passed to perrow may be a single number, or a list of numbers delimited by. This feature may also be combined with total_width for multiple rows of images with the same total width.



TemplateData
{   "description": "This template creates a box with two to ten images arranged vertically or horizontally with captions for the entire box and/or for each images.", "params": { "align": { "type": "string", "label": "Align", "default": "right", "description": 'left/right/center/none — sets text-wrapping around image box, where "none" places the box on the left edge with no text-wrapping, "center" places the box at center with no text-wrapping and "left" and "right" refer to position of box on screen with text-wrapping.' },       "direction": { "default": "horizontal", "type": "string", "label": "Direction", "description": "horizontal/vertical" },       "width": { "type": "string", "label": "Width", "description": 'width overrides width1, width2, width3, etc. If you want the images to be different sizes, do not provide the width parameter. Integer width in pixels; no "px" suffix' },       "background color": { "type": "string", "label": "Background color", "description": "defines the background color between the border of the box and the images." },       "header": { "type": "string", "label": "Header" },       "footer": { "type": "string", "label": "Footer" },       "caption_align": { "default": "left", "type": "string", "label": "Caption alignment", "description": "left/right/center" },       "header_align": { "default": "center", "type": "string", "label": "Header alignment", "description": "left/right/center" },       "footer_align": { "default": "left", "type": "string", "label": "Footer alignment", "description": "left/right/center" },       "header_background": { "type": "string", "label": "Header background" },       "footer_background": { "type": "string", "label": "Footer background" },       "image1": { "description": 'image1 is name of first image. Similarly for image2, etc. File name only; no "File:" or "Image:" prefix.', "type": "string" },       "width1": { "description": "width1 is width of first image. Similarly for width2, etc.", "type": "number" },       "alt1": { "type": "string", "description": "alt1 is alt text of first image (see WP:ALT). Similarly for alt2, etc." },       "caption1": { "type": "string", "description": "caption1 is caption of first image. Similarly for caption2, etc." },       "link1": { "type": "string/wiki-page-name", "description": "is where the first page links to. Similarly for link2, etc. If not specified, image links to the image description page as usual. If specified to the empty value, the image does not link anywhere; this should be used for purely decorative images as per WP:ALT.\nImportant: If the image is under a free license like the GFDL or a CC license, you must not use this parameter as the terms of those licenses require the license, or a link to it, to be reproduced with the image. The image must, therefore, link to its image page. Public domain and (theoretically) fair use images are not subject to this restriction." },       "image2": {}, "width2": {}, "alt2": {}, "caption2": {}, "link2": {}, "image3": {}, "width3": {}, "alt3": {}, "caption3": {}, "link3": {} } }