コンテンツにスキップ

Template:Multiple image

半永久的に拡張半保護されているテンプレート
テンプレートの解説[表示] [編集] [履歴] [キャッシュを破棄]

2枚から5枚までの画像をボックスで並べるテンプレートです。垂直にも水平にも説明付きで指定できます。

引数

  • align 画像ボックスの位置を指定します。デフォルトは center です。
  • direction 画像の並べ方を指定します。デフォルトは horizontal(水平)です。
  • header 最上部に表示される文字入りの帯を形成しますので、画像ボックス全体に係る文字列(タイトルもしくは説明文)を記入します。無記の場合、帯は表示されません。
    • 表示したくない場合は、無記でもよいし、header 関連の引数を省いても問題ありません。
    • デフォルトでは無地(白地)に黒で文字が表示されますが、header_background の欄に色名を記入することにより header の地の色を変更できます。
    • また、header の文字を白抜きで表示することも可能です。白抜き文字(色が付いた地の中で、文字を白く抜いた文字修飾)の指定の実際は「その他の使用例」を参照のこと。なお、header_background で地の色を濃いものに指定しなければ白抜き文字を明確に表示することはできません。
  • header_align 最上部の帯に表示する文字列を左右と中央のどこに寄せるかを指定します。デフォルトは center(中央寄せ)です。
  • header_background 色名を記入することで header の地の色を指定できます。色名はウェブカラー名(redなど)と16進表記(#ED1A3Dなど)のいずれかで表します。header の文字を白抜きに指定した場合、こちらで濃い色名を指定することで表示環境が整います。
  • caption_align 各画像のキャプション(説明文)を左右と中央のどこに寄せるかを一括で指定します。デフォルトは left(左寄せ)です。
  • footer 最下部のキャプションを入力します。個々の画像ではなく全体に係るキャプションが必要な場合に使います。また、画像は画像だけで連続して表示し、全てのキャプションを最下部でまとめて入力したい場合に使います。
  • footer_align 最下部のキャプションを左右と中央のどこに寄せるか指定します。デフォルトは left(左寄せ)です。
  • total_width 全体の横サイズを指定します。各画像の縦サイズも自動で統一されます。
  • width 全ての画像の統一サイズを指定します。画像ごとにサイズを指定する width1, width2, width3, width4, width5 よりも優先させます。したがって、画像ごとに異なったサイズを指定したい場合は width を指定しない、もしくは、引数ごと省きます。また、全て同じサイズであるなら width 以外は必要ありません。
  • image1 1枚目に指定する画像のファイル名を(ファイル名のみで)入力します。以下、image2と続きます。
  • width1 1枚目に指定した画像のサイズを(数字のみで)入力します。以下、width2と続きます。
  • alt1 1枚目に指定した画像の代替テキスト。画像を表示しない環境を選択している場合や表示できない環境あるいは状況の下でのみ用いられる文字情報です。代替テキストというのは、画像を見ることができなかったり見づらかったりする視覚障害者、画像を表示しない設定にしている閲覧者、一時的に見えない状態に置かれた閲覧者などのために用意されている、音声読み上げ用テキストです。画像を表示できている一般的な設定や環境のもとでは表示されません。テキストの内容は、その画像がもつ情報のなかから"画像を見られない閲覧者が取得して意味のある情報"だけを抽出し、音声に変換しやすい平易かつ端的な文を理想とします。最下段にかなり説明を要する画像と例文がありますが、詳しくは「w:画像の代替テキスト」をご覧ください。以下、alt2と続きます。
  • caption1 1枚目に指定した画像のキャプションを記します。画像の下に表示されます。以下、caption2と続きます。
  • link1 1枚目に指定した画像をクリックした時に表示される記事名。以下、link2と続きます。指定しない場合(引数ごと省く場合)は、画像の詳細ページが表示されます。空白にした場合( |link1= とのみ記述した場合)はクリックしても何も起こりません。リンクを設定した使用例を参照。ライセンスがパブリックドメインの画像にのみ、この機能を使用して下さい。「画像リンクの注意」を参照のこと。
  • background color 画像ボックスの背景色を指定します。「背景色を設定した使用例」を参照のこと。
  • 画像説明文欄 (header, footer, captions) は任意で入力します。
{{multiple image
 | align     = left/right/center
 | direction = horizontal/vertical
 | header    = 
 | header_align = left/right/center
 | header_background = 
 | footer    = 
 | footer_align = left/right/center
 | footer_background = 
 | width     = 

 | image1    = 
 | width1    = 
 | alt1      = 
 | caption1  = 

 | image2    = 
 | width2    = 
 | alt2      = 
 | caption2  = 

 | image3    = 
 | width3    = 
 | alt3      = 
 | caption3  = 

 | image4    = 
 | width4    = 
 | alt4      = 
 | caption4  = 

 | image5    = 
 | width5    = 
 | alt5      = 
 | caption5  = 
}}

使用例

{{multiple image
 | footer    = [[イエローカード]]で[[警告]]、[[レッドカード]]で[[退場]]となります。
 | width     = 60
 | image1    = Yellow card.svg
 | alt1      = イエローカード
 | image2    = Red card.svg
 | alt2      = レッドカード
}}


{{multiple image
 | align     = left
 | direction = vertical
 | header    = [[透明チャネル]]を含む[[Portable Network Graphics|PNG]]画像
 | width     = 200
 | image1    = PNG transparency demonstration 1.png
 | alt1      = 白の背景に色とりどりのサイコロ
 | caption1  = 8ビット透明チャネルを含むPNG画像
 | image2    = PNG transparency demonstration 2.png
 | caption2  = 同じ画像を[[市松模様]]の背景の上に重ねたもの
 | alt2      = 市松模様の背景に色とりどりのサイコロ
}}
透明チャネルを含むPNG画像
白の背景に色とりどりのサイコロ
8ビット透明チャネルを含むPNG画像
市松模様の背景に色とりどりのサイコロ
同じ画像を市松模様の背景の上に重ねたもの


2
3
4
2から始まる数の順番
{{multiple image
 | footer   = 2から始まる数の順番
 | width    = 60
 | image1   = Ribbon numeral 2.png
 | alt1     = 2
 | image2   = Ribbon numeral 3.png
 | alt2     = 3
 | image3   = Ribbon numeral 4.png
 | alt3     = 4
}}

背景色を設定した使用例

緑色のハーブと、黄色と白の小さな花。
緑の葉っぱに囲まれた、黄色と白の小さな花3輪。
3枚の葉っぱそれぞれに3つの裂片(れつへん)
レンプクソウ (Adoxa moschatellina)
{{multiple image
 | image1=Adoxa_moschatellina_210406.jpg
 | alt1=緑色のハーブと、黄色と白の小さな花。

 | image2=Adoxa_moschatellina_210406a.jpg
 | alt2=緑色の葉っぱに囲まれた、黄色と白の小さな花3輪。

 | image3=adoxa_moschatellina_blatt.jpeg
 | alt3=3枚の葉っぱそれぞれに3つの裂片(れつへん)

 | footer=[[レンプクソウ]] (''Adoxa moschatellina'')
 | footer_background=#BD9
 | background color=#BD9
 | footer_align=center
 | width=160
}}

リンクを設定した使用例

参考:魚のマス

ラバ
1. ラバ
ロバ
2. ロバ
マス(サカナの鱒)
3. マス
ラバ(1)の画像をクリックするとラバの記事が表示されます。ロバ(2)の画像の場合クリックしても何も起こりません。マス(3)の画像をクリックすると画像の詳細ページが表示されます。
{{multiple image
 | footer    = ラバ(左)の画像をクリックすると[[ラバ]]の記事が表示されます。ロバ(中)の画像の場合クリックしても何も起こりません。マス(右)の画像をクリックすると画像の詳細ページが表示されます。
 | align     = left
 | caption_align = center

 | image1    = Juancito.jpg
 | width1    = 143
 | alt1      = ラバ
 | caption1  = 1. ラバ
 | link1     = ラバ

 | image2    = Donkey 1 arp 750px.jpg
 | width2    = 150
 | alt2      = ロバ
 | caption2  = 2. ロバ
 | link2     =

 | image3    = Rainbow_trout.png
 | width3    = 91
 | alt3      = マス(サカナの鱒)
 | caption3  = 3. マス
}}

total_widthを設定した使用例

1. ラバ
2. ロバ
3. マス
total_width を使用すると全体の横サイズが指定でき、自動で画像の縦サイズも統一されます。この例は350に設定しています。

その他の使用例

ブラウニー
アーサー ラッカムの挿絵。自らの背丈の倍近くある長いエダボウキ(ゴワゴワした木の枝で出来ている箒)を使って台所の床の汚れを取りのぞこうとしているブラウニーを描いた水彩画。赤黒い頭巾をかぶっている。
古いに棲み着いている精霊ブラウニーが、台所の床のごみと汚れを取り除こうとを使って掃除している。
描き手はイングランド挿絵画家アーサー・ラッカム1910年発表の水彩画

単独で使用しています。header に白抜き文字を使った例でもあります。白抜き文字には Font colorウェブカラーを使っています。ウェブカラーについて、ここでは英語名を使いましたが、HTML色名の場合は #191970 と入力します。

{{multiple image
 | align     = right
 | header    = {{font color|white|ブラウニー}}
 | header_background = midnightblue
 | image1    = Illustration of a brownie by Arthur Rackham.jpg
 | width1    = 230
 | alt1      = アーサー ラッカムの挿絵。自らの背丈の倍近くある長いエダボウキ(ゴワゴワした木の枝で出来ている箒)を使って台所の床の汚れを取りのぞこうとしているブラウニーを描いた水彩画。赤黒い頭巾をかぶっている。
 | caption1  = 古い[[家]]に棲み着いている[[精霊]]・[[ブラウニー]]が、[[台所]]の床の[[ごみ]]と汚れを取り除こうと[[箒]]を使って[[掃除]]している。<hr />描き手は[[イングランド]]の[[挿絵]]画家[[アーサー・ラッカム]]。[[1910年]]発表の[[水彩画]]。
}}

TemplateData

これはビジュアルエディターテンプレートウィザードにより使用されるテンプレートのためのTemplateData文書です。

Multiple image

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

テンプレートパラメーター[テンプレートデータを編集]

このテンプレートはカスタムの書式を採用します。

パラメーター説明状態
Alignmentalign

Sets text-wrapping around image box, where "none" places the box on the left edge with no text-wrapping, "center" places the box at center with no text-wrapping and "left" and "right" refer to position of box on screen with text-wrapping.

値の候補
left center right none
既定
right
left/right/center/none
文字列省略可能
Directiondirection

Direction in which to tile the images.

値の候補
horizontal vertical
既定
horizontal
horizontal/vertical
文字列推奨
Frame widthtotal_width

Use to scale the images to the same height and this total width. Do not use both total_width and width. Integer width in pixels; no "px" suffix

400
数値推奨
Row layoutperrow

Create an array of images, with multiple rows. The value passed to may be a single number or a list of numbers with each row delimited by /. Can be combined with total_width for automatic sizing of images.

1 / 2 / 1
文字列省略可能
Image widthwidth

Width overrides Width 1, Width 2, Width 3, etc. If you want the images to be different sizes, do not provide the width parameter. Integer width in pixels; no "px" suffix

200
数値省略可能
Background colorbackground color

Defines the background color between the border of the box and the images. Changing the background can be bad for accessibility, avoid when possible.

#EEFFGG or red
文字列省略可能
CSSクラスclass

テンプレートのCSSクラス。主にダークモードテーマオプションに使用されます。skin-invert-imageを指定すると全ての画像で色反転などダークモード機能が有効になります。ダークモードで化学構造などを適切に表示するために必要になります。このパラメータは日本語版Wikipediaの独自パラメータです。(半角空白で区切る)

skin-invert-image / bg-transparent
文字列省略可能
Caption alignmentcaption_align

説明なし

値の候補
left center right
既定
left
left/right/center
文字列省略可能
Image 1image1

Image 1 is name of first image. Similarly for Image 2, etc. File name only; no "File:" or "Image:" prefix.

example.jpg
ファイル必須
CSSクラス1class1

画像1のCSSクラス。主にダークモードテーマオプションに使用されます。skin-invert-imageを指定すると画像1で色反転などダークモード機能が有効になります。ダークモードで化学構造などを適切に表示するために必要になります。(半角空白で区切る)

skin-invert-image / bg-transparent
文字列省略可能
Width 1width1

Width 1 is width of first image. Similarly for Width 2, etc.

数値省略可能
Alt text 1alt1

The [[alt text]] of first image (see [[WP:ALT]]). Similarly for Alt text 2, etc.

推奨
Caption 1caption1

Caption 1 is caption of first image. Similarly for Caption 2, etc.

内容推奨
Link 1link1

Where the first page links to. Similarly for Link 2, etc. If not specified, image links to the image description page as usual. If specified to the empty value, the image does not link anywhere; this should be used for purely decorative images as per [[WP:ALT]]. Important: If the image is under a free license like the GFDL or a CC license, you must not use this parameter as the terms of those licenses require the license, or a link to it, to be reproduced with the image. The image must, therefore, link to its image page. Public domain and (theoretically) non-free use images are not subject to this restriction.

ページ名省略可能
Thumbtime 1thumbtime1

If image1 is an Ogg Theora file, sets the time within the video that is used for the initial display. Either a number of seconds or hours:minutes:seconds. Similarly for Thumb time 2, etc.

文字列省略可能
Image 2image2

説明なし

example.jpg
ファイル推奨
Class 2class2

説明なし

文字列省略可能
Width 2width2

説明なし

数値省略可能
Alt text 2alt2

説明なし

推奨
Caption 2caption2

説明なし

内容推奨
Link 2link2

説明なし

ページ名省略可能
Thumbtime 2thumbtime2

説明なし

文字列省略可能
Image 3image3

説明なし

example.jpg
ファイル省略可能
Class 3class3

説明なし

文字列省略可能
Width 3width3

説明なし

数値省略可能
Alt text 3alt3

説明なし

省略可能
Caption 3caption3

説明なし

内容省略可能
Link 3link3

説明なし

ページ名省略可能
Thumbtime 3thumbtime3

説明なし

文字列省略可能
Image 4image4

説明なし

example.jpg
ファイル省略可能
Class 4class4

説明なし

文字列省略可能
Width 4width4

説明なし

数値省略可能
Alt text 4alt4

説明なし

省略可能
Caption 4caption4

説明なし

内容省略可能
Link 4link4

説明なし

ページ名省略可能
Thumbtime 4thumbtime4

説明なし

文字列省略可能
Image 5image5

説明なし

example.jpg
ファイル省略可能
Class 5class5

説明なし

文字列省略可能
Width 5width5

説明なし

数値省略可能
Alt text 5alt5

説明なし

省略可能
Caption 5caption5

説明なし

内容省略可能
Link 5link5

説明なし

ページ名省略可能
Thumbtime 5thumbtime5

説明なし

文字列省略可能
Image 6image6

説明なし

example.jpg
ファイル省略可能
Class 6class6

説明なし

文字列省略可能
Width 6width6

説明なし

数値省略可能
Alt text 6alt6

説明なし

省略可能
Caption 6caption6

説明なし

内容省略可能
Link 6link6

説明なし

ページ名省略可能
Thumbtime 6thumbtime6

説明なし

文字列省略可能
Image 7image7

説明なし

example.jpg
ファイル省略可能
Class 7class7

説明なし

文字列省略可能
Width 7width7

説明なし

数値省略可能
Alt text 7alt7

説明なし

省略可能
Caption 7caption7

説明なし

内容省略可能
Link 7link7

説明なし

ページ名省略可能
Thumbtime 7thumbtime7

説明なし

文字列省略可能
Image 8image8

説明なし

example.jpg
ファイル省略可能
Class 8class8

説明なし

文字列省略可能
Width 8width8

説明なし

数値省略可能
Alt text 8alt8

説明なし

省略可能
Caption 8caption8

説明なし

内容省略可能
Link 8link8

説明なし

ページ名省略可能
Thumbtime 8thumbtime8

説明なし

文字列省略可能
Image 9image9

説明なし

example.jpg
ファイル省略可能
Class 9class9

説明なし

文字列省略可能
Width 9width9

説明なし

数値省略可能
Alt text 9alt9

説明なし

省略可能
Caption 9caption9

説明なし

内容省略可能
Link 9link9

説明なし

ページ名省略可能
Thumbtime 9thumbtime9

説明なし

文字列省略可能
Image 10image10

説明なし

example.jpg
ファイル省略可能
Class 10class10

説明なし

文字列省略可能
Width 10width10

説明なし

数値省略可能
Alt text 10alt10

説明なし

省略可能
Caption 10caption10

説明なし

内容省略可能
Link 10link10

説明なし

ページ名省略可能
Thumbtime 10thumbtime10

説明なし

文字列省略可能
Image gapimage_gap

Override the distance between adjacent images. Integer width in pixels; no "px" suffix

既定
5
20
数値省略可能
Image styleimage_style

Override the default styling of the image frame.

文字列省略可能
Headerheader

A header text to place above the entire frame.

内容省略可能
Header backgroundheader_background

Defines the background color of the header field. Changing the background can be bad for accessibility, avoid when possible

#EEFFGG or red
文字列省略可能
Header alignmentheader_align

説明なし

既定
center
left/right/center
文字列省略可能
Footerfooter

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.

内容省略可能
Footer backgroundfooter_background

Defines the background color of the footer field. Changing the background can be bad for accessibility, avoid when possible

#EEFFGG or red
文字列省略可能
Footer alignmentfooter_align

説明なし

値の候補
left center right
既定
left
left/right/center
文字列省略可能
Show or hide borderborder

Use value "infobox" to hide the border when using the template within an infobox.

値の候補
infobox
不明省略可能

関連項目