Template:Image array/doc

From English Wikipedia @ Freddythechick

This template is used to generate a rectangular image array, typically for use within an infobox. For image galleries, please use {{gallery}} or <gallery>...</gallery>. For most other uses, please consider using {{multiple image}} instead.

Basic usage

A 4x4 image array <syntaxhighlight lang="wikitext"></syntaxhighlight> <syntaxhighlight lang="wikitext"> </syntaxhighlight> A 5x5 image array <syntaxhighlight lang="wikitext"></syntaxhighlight> A 5x6 image array <syntaxhighlight lang="wikitext"></syntaxhighlight>

Embedding

To create a simple floating image array, use the template with {{Image frame}}. <syntaxhighlight lang="wikitext">

</syntaxhighlight>

Additional parameters

Default image size

The default image size is 60px by 70px. To override this default, use |width=YY and |height=ZZ, where YY and ZZ are raw numbers, without the px units.

Alternative text

To add alternative text for an image, use |altX=, where X is the image number.

Hint text

To add hint or tooltip text for an image, use |textX=, where X is the image number. To use the captions for the hint or tooltip text for all images, use |text=y.

Link text

By default, clicking on an image will direct the viewer to the file page, which contains licensing and attribution information for the image. This is required for any non-public domain images. To change the link to the image, use |linkX=, where X is the image number. However, be careful to make sure that you only do this for public domain images that do not require attribution.

Borders

To add a standard image border to an image, use |borderX=, where X is the image number. To add a border around all the image cells, use |border-width=X, where X is the width in pixels.

Classes

To add a class to the entire image array, use |class=. For example, |class=infobox or |class=toccolours.

Examples.

Example 1: images only

<syntaxhighlight lang="wikitext" style="overflow:auto">

</syntaxhighlight>

Example 2: optional parameters

<syntaxhighlight lang="wikitext" style="overflow:auto">

alt1
caption1
alt2
caption2
alt3
caption3
alt4
caption4

</syntaxhighlight>

alt1
caption1
alt2
caption2
alt3
caption3
alt4
caption4

See also