Editing
Template:Multiple image/doc
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==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 :<syntaxhighlight lang="xml"> {{multiple image <!-- Layout parameters --> | align = <!-- right (default), left, center, none --> | direction = <!-- horizontal (default), vertical --> | background color = <!-- box background --> | width = <!-- displayed width of each image in pixels (an integer, omit "px" suffix); overrides "width[n]"s below --> | caption_align = <!-- left (default), center, right --> <!-- Header --> | header_background = | header_align = <!-- center (default), left, right --> | header = <!--image 1--> | image1 = <!-- filename only, i.e. without "File:" or "Image:" prefix --> | width1 = <!-- displayed width of image; overridden by "width" above --> | alt1 = | link1 = | thumbtime1 = | caption1 = <!--image 2--> | image2 = <!-- filename only, i.e. without "File:" or "Image:" prefix --> | width2 = <!-- displayed width of image; overridden by "width" above --> | alt2 = | link2 = | thumbtime2 = | caption2 = <!-- and so on, to a maximum of 10 images (image10) --> <!-- Footer --> | footer_background = | footer_align = <!-- left (default), center, right --> | footer = }} </syntaxhighlight> ;Automatic resizing of all images to the same height and to a given total width :<syntaxhighlight lang="xml"> {{multiple image <!-- Layout parameters --> | align = <!-- right (default), left, center, none --> | direction = <!-- horizontal (default), vertical --> | background color = <!-- box background --> | total_width = <!-- total width of all the displayed images in pixels (an integer, omit "px" suffix) --> | caption_align = <!-- left (default), center, right --> <!-- Header --> | header_background = | header_align = <!-- center (default), left, right --> | header = <!--image 1--> | image1 = <!-- filename only, i.e. without "File:" or "Image:" prefix --> | alt1 = | link1 = | thumbtime1 = | caption1 = <!--image 2--> | image2 = <!-- filename only, i.e. without "File:" or "Image:" prefix --> | alt2 = | link2 = | thumbtime2 = | caption2 = <!-- and so on, to a maximum of 10 images (image10) --> <!-- Footer --> | footer_background = | footer_align = <!-- left (default), center, right --> | footer = }} </syntaxhighlight> {| class=wikitable ! Parameter !! Description |- | align || right ''(default)'', left, center |- | direction || horizontal ''(default)'', vertical |- | background color || To set [[wikipedia:List of colors|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 <code>width[n]</code> 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 <code>total_width</code> and <code>width</code>. |- | 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 <code>width</code> (if set). (2) The full width of the original [n]th image if <code>total_width</code> 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 <code>total_width</code> is given in order to resize all images to the same height and a given total width. Ignored otherwise. |- | alt''[n]'' || ''(as above)'' [[wikipedia:alt attribute|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 , linking is disabled.<br />'''''Note:''''' This parameter '''''must not''''' be used with images that have been given [[wikipedia:free license|free licenses]] (such as the [[wikipedia:GNU Free Documentation License|GDFL]] or a free [[wikipedia:Creative Commons license|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 [[:c: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 [[#Using direction|display the images vertically]]. |}
Summary:
Please note that all contributions to Meta Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Meta Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Dark mode
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit
View history
More
Purge
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information
Get shortened URL