Bản mẫu:Auto images/doc

This template is a simplified version of Multiple image. It can be used to arrange two to six images in a horizontal row. They will automatically be scaled so that they are all of the same height and together have specified total width. Each image can have its own caption; the complete row can have a title.
Any number of horizontal rows of images can be placed underneath one another to form a combined set.

**Usage**

**Blank template**
Parameters with numerical values, if unused, must be removed and not left blank; if left blank, they may cause undesirable side-effects. These include widthN, heightN and total_width. If total_width is omitted, the default value is 600.

**Parameters**
Six parameters apply to the set of images as whole.- cont – any nonblank value (e.g. yes) is used to combine a row of images produced by this template with the one above (see below).- boxclass – use to replace/disable the default "wikitable" class used to style the box in which the images etc appear.- boxstyle – use to supplement the CSS styling applied to the box.- title – specifies an optional title placed at the top of the set of images.- total_width – optionally specifies the total width of the set of images. The default is 600 (pixels), which is good for a screen width of 800 and for printing.- align (or float) – specifies the alignment of the set of images:
** left: aligns them to the left of the page, wrapping text to the right. 
** right: aligns them to the right of the page, wrapping text to the left. 
** center: aligns them to the centre of the page, with no text wrapping; this is the default.
** left_nowrap (or none): aligns them to the left of the page, with no text wrapping to the right.
** right_nowrap: aligns them to the right of the page, with no text wrapping to the left. - text_align – specifies the alignment of the caption text for each image as well as the overall footer. The default is left. It may be set to center or right.- footer – optionally specifies footer text which runs across the bottom of all of the images.
Each image is described by five parameters. "N" below takes the values 1, 2, ..., 6 for the maximum of six images:- widthN – this is the width in pixels of the full resolution version of the image in Commons or Wikipedia. Examine the individual image page to obtain the full resolution.- heightN – this is the height in pixels of the full resolution version of the image in Commons or Wikipedia.- imageN – the name of the image in Commons or Wikipedia (do not precede by "File:" or "Image:").- captionN – an optional caption for the image.- altN – alternative text. See WP:ALT.

**Examples**
The great advantage of this template over Multiple image is that if you decide to add or remove an image or change the total width of the row of images, you don't have to recalculate the widths. Thus:
produces:
produces:
produces:

**Combining rows of images**
To produce multiple horizontal rows of images, the template can be repeated any number of times, using the same value of total_width each time. Specifying cont = yes (or any other nonblank value) on the second and subsequent uses ensures that there is only a single line between the two rows; without it there will be a double line.
produces:

**Limitations, debugging**
 Only a maximum of six images are allowed in a row. Unless the total width is made large, which is undesirable for printing and for readers with smaller screens, more than this number of images means that they are likely to be rather small.- If the displayed images are not all of the same height, then the widthN and heightN parameters have been omitted or set incorrectly for one or more images. Recall that they should be the width and height of the highest resolution version of the image in Commons or Wikipedia.- A long title can force a row of images to be wider than the specified value of total_width.

**Supporting templates**
 Auto images/aux

**See also**
 Multiple image, which is much more flexible as regards layout, but requires manual calculation to ensure that all the images are of the same height.- Image array- Image frame- Photomontage