Template:Multiple image
From Iwe
{{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
{{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
Template loop detected: Template:Multiple image
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
Template loop detected: Template:Multiple image
<source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>
[edit] With links (link[n])
Template loop detected: Template:Multiple image Template:Clear left <source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). Template loop detected: Template:Multiple image Template loop detected: Template:Multiple image
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
Template loop detected: Template:Multiple image
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}
{{#ifeq:Multiple image|sandbox | | }} </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
{{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
Template loop detected: Template:Multiple image
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
Template loop detected: Template:Multiple image
<source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>
[edit] With links (link[n])
Template loop detected: Template:Multiple image Template:Clear left <source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). Template loop detected: Template:Multiple image Template loop detected: Template:Multiple image
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
Template loop detected: Template:Multiple image
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}
{{#ifeq:Multiple image|sandbox | | }} </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
{{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
Template loop detected: Template:Multiple image
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
Template loop detected: Template:Multiple image
<source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>
[edit] With links (link[n])
Template loop detected: Template:Multiple image Template:Clear left <source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). Template loop detected: Template:Multiple image Template loop detected: Template:Multiple image
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
Template loop detected: Template:Multiple image
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}
{{#ifeq:Multiple image|sandbox | | }}
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
{{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
Template loop detected: Template:Multiple image
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
Template loop detected: Template:Multiple image
<source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>
[edit] With links (link[n])
Template loop detected: Template:Multiple image Template:Clear left <source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). Template loop detected: Template:Multiple image Template loop detected: Template:Multiple image
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
Template loop detected: Template:Multiple image
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}
{{#ifeq:Multiple image|sandbox | | }}
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
{{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
Template loop detected: Template:Multiple image
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
Template loop detected: Template:Multiple image
<source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>
[edit] With links (link[n])
Template loop detected: Template:Multiple image Template:Clear left <source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). Template loop detected: Template:Multiple image Template loop detected: Template:Multiple image
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
Template loop detected: Template:Multiple image
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}
{{#ifeq:Multiple image|sandbox | | }}
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
{{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
Template loop detected: Template:Multiple image
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
Template loop detected: Template:Multiple image
<source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>
[edit] With links (link[n])
Template loop detected: Template:Multiple image Template:Clear left <source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). Template loop detected: Template:Multiple image Template loop detected: Template:Multiple image
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
Template loop detected: Template:Multiple image
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}
{{#ifeq:Multiple image|sandbox | | }}
<source lang="moin" style="overflow:auto;"> {{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
Template loop detected: Template:Multiple image
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
Template loop detected: Template:Multiple image
<source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>
[edit] With links (link[n])
Template loop detected: Template:Multiple image Template:Clear left <source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). Template loop detected: Template:Multiple image Template loop detected: Template:Multiple image
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
Template loop detected: Template:Multiple image
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}
{{#ifeq:Multiple image|sandbox | | }} </source>
[edit] With links (link[n])
{{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
Template loop detected: Template:Multiple image
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
Template loop detected: Template:Multiple image
<source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>
[edit] With links (link[n])
Template loop detected: Template:Multiple image Template:Clear left <source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). Template loop detected: Template:Multiple image Template loop detected: Template:Multiple image
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
Template loop detected: Template:Multiple image
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}
{{#ifeq:Multiple image|sandbox | | }} Template:Clear left <source lang="moin" style="overflow:auto;"> {{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
Template loop detected: Template:Multiple image
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
Template loop detected: Template:Multiple image
<source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>
[edit] With links (link[n])
Template loop detected: Template:Multiple image Template:Clear left <source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). Template loop detected: Template:Multiple image Template loop detected: Template:Multiple image
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
Template loop detected: Template:Multiple image
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}
{{#ifeq:Multiple image|sandbox | | }} </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). {{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
Template loop detected: Template:Multiple image
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
Template loop detected: Template:Multiple image
<source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>
[edit] With links (link[n])
Template loop detected: Template:Multiple image Template:Clear left <source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). Template loop detected: Template:Multiple image Template loop detected: Template:Multiple image
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
Template loop detected: Template:Multiple image
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}
{{#ifeq:Multiple image|sandbox | | }} {{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
Template loop detected: Template:Multiple image
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
Template loop detected: Template:Multiple image
<source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>
[edit] With links (link[n])
Template loop detected: Template:Multiple image Template:Clear left <source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). Template loop detected: Template:Multiple image Template loop detected: Template:Multiple image
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
Template loop detected: Template:Multiple image
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}
{{#ifeq:Multiple image|sandbox | | }}
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
{{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
Template loop detected: Template:Multiple image
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
Template loop detected: Template:Multiple image
<source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>
[edit] With links (link[n])
Template loop detected: Template:Multiple image Template:Clear left <source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). Template loop detected: Template:Multiple image Template loop detected: Template:Multiple image
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
Template loop detected: Template:Multiple image
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}
{{#ifeq:Multiple image|sandbox | | }}
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
{{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
Template loop detected: Template:Multiple image
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
Template loop detected: Template:Multiple image
<source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>
[edit] With links (link[n])
Template loop detected: Template:Multiple image Template:Clear left <source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). Template loop detected: Template:Multiple image Template loop detected: Template:Multiple image
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
Template loop detected: Template:Multiple image
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}
{{#ifeq:Multiple image|sandbox | | }}
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. {{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
Template loop detected: Template:Multiple image
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
Template loop detected: Template:Multiple image
<source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>
[edit] With links (link[n])
Template loop detected: Template:Multiple image Template:Clear left <source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). Template loop detected: Template:Multiple image Template loop detected: Template:Multiple image
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
Template loop detected: Template:Multiple image
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}
{{#ifeq:Multiple image|sandbox | | }}
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). {{#ifeq: multiple image | doc
|
{{
#ifeq: show | show| {{#ifeq:|yes||
{{{topimage}}}{{#if: | {{{topcaption}}} }} |
{{{pretitle}}} |
}}Message box meta-templates |
---|
{{{image}}}{{#if: | {{{caption}}} }} |
{{{above}}} |
{{{heading1}}} |
|
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
{{{heading4}}} |
{{{heading5}}} |
{{{content5}}} |
{{{heading6}}} |
{{{content6}}} |
{{{heading7}}} |
{{{content7}}} |
{{{heading8}}} |
{{{content8}}} |
{{{heading9}}} |
{{{content9}}} |
{{{heading10}}} |
{{{content10}}} |
{{{heading11}}} |
{{{content11}}} |
{{{heading12}}} |
{{{content12}}} |
{{{heading13}}} |
{{{content13}}} |
{{{heading14}}} |
{{{content14}}} |
{{{heading15}}} |
{{{content15}}} |
{{{heading16}}} |
{{{content16}}} |
{{{heading17}}} |
{{{content17}}} |
{{{heading18}}} |
{{{content18}}} |
{{{heading19}}} |
{{{content19}}} |
{{{heading20}}} |
{{{content20}}} |
{{{heading21}}} |
{{{content21}}} |
{{{heading22}}} |
{{{content22}}} |
{{{heading23}}} |
{{{content23}}} |
{{{heading24}}} |
{{{content24}}} |
{{{heading25}}} |
{{{content25}}} |
{{{heading26}}} |
{{{content26}}} |
{{{heading27}}} |
{{{content27}}} |
{{{heading28}}} |
{{{content28}}} |
{{{heading29}}} |
{{{content29}}} |
{{{heading30}}} |
{{{content30}}} |
{{{heading31}}} |
{{{content31}}} |
{{{heading32}}} |
{{{content32}}} |
{{{heading33}}} |
{{{content33}}} |
{{{heading34}}} |
{{{content34}}} |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
{{#switch: mbox templates
|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project } |line=Comenius - To boost local and international tourism with OpenStreetMap - BoostOSM
{ class="center" - style="width:16%;vertical-align:bottom;" File:Merge.png } |small=Template:Navigation bar | #default =Template:Navigation bar }}
|
}}{{ #if: | | {{#ifexist:Template:Multiple image|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} Template:Lua
This template creates a box containing between two and ten images, arranged either vertically or horizontally and with captions for the entire box or per image.
With the appropriate choice of parameters, the template can automatically resize images to a given total width with each image having the same height.
Be aware that this template does not respect users' default image size preferences. (Wikipedia:Image use policy states: Template:Tq)
If image size parameters are omitted, this template sets all images at 200px wide, regardless of whether the reader has set a preference for some other default image width. This causes multiple images to look out of scale to the other images in an article.
[edit] Syntax and parameters
Provide height[n] and total_width parameters to obtain automatic resizing. Note the different meanings of the width[n] parameters with vs. without automatic resizing.
- No automatic resizing of all images to the same height
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
- Automatic resizing of all images to the same height and to a given total width
- <source lang="xml">
Template loop detected: Template:Multiple image </source>
Parameter | Description |
---|---|
align | right (default), left, center |
direction | horizontal (default), vertical |
background color | To set the background color of the box in which the images appear. |
header_background | |
header_align | center (default), left, right |
header | |
width | Use to set the same width for each image (i.e. overrides any Template:Mono below). Do not include if different image widths intended, including if images are to be resized to a fixed total width. |
total_width | Use to scale the images to the same height and this total width. Do not use both Template:Mono and Template:Mono. |
image[n] | (where [n] = 1 to 10) Filename of [n]th image. |
width[n] | (as above) Two meanings: (1) The width (in pixels, integer, omit "px") of [n]th image. Overridden by Template:Mono (if set). (2) The full width of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. |
height[n] | (as above) The full height of the original [n]th image if Template:Mono is given in order to resize all images to the same height and a given total width. Ignored otherwise. |
alt[n] | (as above) Alt description for [n]th image. |
link[n] | (as above) To specify the page to which the [n]th image is linked (i.e. the page that is loaded when the image is clicked). If set as empty (e.g. Template:Mono), linking is disabled (even to the standard Wikipedia image description page); consider WP:ALT. Note: This parameter must not be used with images that have been given free licenses (such as the GDFL or a free CC license) as these licenses require images to be linked to a declaration of the license under which they are being used. |
thumbtime[n] | (as above) When using Ogg Theora files, sets the time within the video that is used for the initial display. This is either a number of seconds or hours:minutes:seconds; see commons:Commons:Video#Setting a video thumbnail image. |
caption[n] | (as above) Caption for the [n]th image. |
caption_align | left (default), center, right |
footer_background | |
footer_align | left (default), center, right |
footer | Caption that spans the entire box, as opposed to individual images. Avoid "left" and "right" if possible, since mobile devices may display the images vertically. |
[edit] Examples
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1 = Yellow card.svg | alt1 = Yellow cartouche | image2 = Red card.svg | alt2 = Red cartouche | footer = Players are cautioned with a yellow card and sent off with a red card. }}
Template loop detected: Template:Multiple image
{{multiple image | align = left | direction = vertical | width = 200 | header = [[Portable Network Graphics|PNG]] transparency demonstration | image1 = PNG transparency demonstration 1.png | alt1 = Colored dice with white background | caption1 = A PNG image with an 8-bit transparency layer... | image2 = PNG transparency demonstration 2.png | alt2 = Colored dice with checkered background | caption2 = ...here overlaying a checkered background. }}
Template loop detected: Template:Multiple image
{{multiple image | width = 60 | image1=Ribbon numeral 2.png | alt1=2 | image2=Ribbon numeral 3.png | alt2=3 | image3=Ribbon numeral 4.png | alt3=4 | footer = When a user has many of one type of [[WP:BARN|barnstar]], they can represent them with [[WP:RIBBON|ribbons]] and these numerals to indicate the count. }}Template:Clear right
[edit] With background color
Template loop detected: Template:Multiple image
<source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>
[edit] With links (link[n])
Template loop detected: Template:Multiple image Template:Clear left <source lang="moin" style="overflow:auto;"> Template loop detected: Template:Multiple image </source>Template:Clear right
[edit] Using direction
By default, the images the template presents are displayed horizontally, as a row (see left; equivalent to setting Template:Mono). To display them vertically, i.e. as a column, set Template:Mono (see right). Template loop detected: Template:Multiple image Template loop detected: Template:Multiple image
On mobile devices some images may always be displayed vertically if the total width is larger than around 320.
[edit] To match image heights
- Decide on a total width for all the images, say 320px
- Set the total width using Template:Para
Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Rectangular image of a donkey, originally 536 pixels high. | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Square image of a trout, originally 300 pixels high. | footer = Both images have been rendered with the same height, and a total width of 320px }}
The aspect ratio of each image is automatically retrieved from the File metadata. You can override the native width and height values by
- Examining 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:
[edit] Multiple rows
To create an array of images, with multiple rows, use Template:Para. The value passed to Template:Para may be a single number, or a list of numbers delimited by /
. This feature may also be combined with Template:Para for multiple rows of images with the same total width.
Template loop detected: Template:Multiple image
{{multiple image|perrow = 2|total_width=300 | image1 = Kern_Theodolit_DKM2-A.jpg | image2 = Total-Robotic-Station.jpg | image3 = DumpyLevel.jpg | image4 = GPS_Survey_Equipment_at_Weir_Dyke_Bridge_-_geograph.org.uk_-_336908.jpg | footer = Surveying Equipment. Clockwise from upper left: Optical Theodolite, Robotic total station, Optical level, [[Real-time kinematic | RTK]] GPS Base station. }}Template:Clear right
[edit] Removing the image border
The border around the images can be removed using Template:Para. Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_style = border:none; | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] Increasing the gap between images
The gap between the images can be increased using Template:Para, where N is the number of pixels (must be non-negative). Template loop detected: Template:Multiple image
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}
{{#ifeq:Multiple image|sandbox | | }}
{{multiple image | align = right | total_width = 320 | image_gap = 20 | image1 = Donkey 1 arp 750px.jpg | alt1 = A donkey | caption1 = Image of a donkey | image2 = Rainbow_trout.png | alt2 = A trout | caption2 = Image of a trout }}Template:Clear right
[edit] TemplateData
[edit] Tracking categories
[edit] See also
- {{Gallery}}
- {{Image array}}
- {{Image frame}}
- {{Photomontage}}