Difference between revisions of "Template:Image"

From The Coppermind
Jump to navigation Jump to search
m (tweak)
m
 
(22 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  +
<includeonly><!--
<includeonly>[[file: {{{1}}}|thumb|{{{side|center}}}|{{{width|10%}}}| {{{2}}} <small>by <page-property key="{{{attribute|artist}}}" page="File:{{{1}}}" no-value="{{missing artist|marker=?}}" no-page="@{{{attribute|artist}}}" /></small>]]</includeonly><noinclude>
 
  +
-->[[file:<!--
This template should be used on pages to include a thumbnail of an image on a page. The
 
  +
FILE: --> {{{1}}}<!--
  +
STYLE:-->|thumb|{{{side|center}}}|{{#if:{{{height|}}}|x{{{height}}}|{{{width|100px}}}|}}<!--
  +
-->|<!--
 
ARTIST: --><div class="attribution">by <page-property key="{{{attribute|artist}}}" page="File:{{{1}}}" no-value="{{missing artist|marker=an unknown artist}}" /></div><!--
  +
CAPTION: --> {{#if:{{{2|}}}|{{{2}}}|}} <!--
  +
LINK: -->{{#if:{{{link|}}}|{{!}}link={{{link}}}}}<!--
  +
ALT TEXT: -->|alt=<page-property key="alt" page="File:{{{1}}}" no-value="" /><!--
  +
-->]]</includeonly><noinclude>[[category: templates|{{PAGENAME}}]]
  +
 
This template should be used on pages to include a thumbnail of an image on a page.
  +
  +
; Usage: {{t|{{lc:{{PAGENAME}}|}}|file-name.extension|caption}}
  +
  +
The file name parameter is required. The caption is technically optional, but is strongly encouraged. There are also several other optional parameters:
  +
  +
<pre>
  +
{{image|file-name.extension|caption
  +
|side=center/left/right
  +
|width=100px
  +
|attribute=artist/art-tracer/art-modified
  +
|link=[[File:file-name.extension]]
  +
}}
  +
</pre>
  +
  +
When copy-pasting the template above, it might be more readable to put it all on the same line; it is split across multiple ones just for clarity. If an optional parameter is not set, it defaults to the first value listed on its line above (height defaults to preserve ratio with the 100px default width).
  +
  +
{| class="wikitable" style="width: 100%"
  +
|+ Usage Examples
  +
|- class="title"
  +
! Parameter !! Description !! Code
  +
! width=30% | Example
  +
|-
  +
|style="text-align: center;"| ''none'' || when only the file name is passed
  +
| <pre>{{image|cosmere symbol.svg}}</pre>
  +
| {{image|cosmere symbol.svg}}
  +
|-
  +
|style="text-align: center;"| ''caption'' || when only the file name and caption are passed
  +
| <pre>{{image|cosmere symbol.svg|this is the caption}}</pre>
  +
| {{image|cosmere symbol.svg|this is the caption}}
  +
|-
  +
|style="text-align: center;"| <code>side=left</code> || pushes the image over to the left, and allows the page to flow around it
  +
| <pre>{{image|cosmere symbol.svg|side=left|this is the caption}}</pre>
  +
| {{image|cosmere symbol.svg|side=left|this is the caption}}
  +
|-
  +
|style="text-align: center;"| <code>side=right</code> || pushes the image over to the right, and allows the page to flow around it
  +
| <pre>{{image|cosmere symbol.svg|side=right|this is the caption}}</pre>
  +
| {{image|cosmere symbol.svg|side=right|this is the caption}}
  +
|-
  +
|style="text-align: center;"| <code>attribute=art-tracer</code><br />or<br /><code>attribute=art-modified</code> || changes the attribution of the image to the "tracer" of the image or the person who modified it instead of the original artist.
  +
| <pre>{{image|cosmere symbol.svg|attribute=art-tracer|this is the caption}}</pre>
  +
| {{image|cosmere symbol.svg|attribute=art-tracer|this is the caption}}
  +
|-
  +
|style="text-align: center;"| <code>width=20%</code> || changes the width of the image
  +
| <pre>{{image|cosmere symbol.svg|width=200px|this is the caption}}</pre>
  +
| {{image|cosmere symbol.svg|width=200px|this is the caption}}
  +
|-
  +
|style="text-align: center;"| <code>height=20%</code> || changes the height of the image
  +
| <pre>{{image|Navani's Ketek glyphs.svg|height=150px|The [[ketek]] "Alight, winds approach deadly approaching winds alight" written in [[glyphs]] and stylized to represent the meeting of the [[Everstorm]] and a [[highstorm]]}}</pre>
  +
| {{image|Navani's Ketek glyphs.svg|height=150px|The [[ketek]] "Alight, winds approach deadly approaching winds alight" written in [[glyphs]] and stylized to represent the meeting of the [[Everstorm]] and a [[highstorm]]}}
  +
|-
  +
|style="text-align: center;"| <code>link=Cosmere</code> || makes the image link to a page instead of its File page
  +
| <pre>{{image|cosmere symbol.svg|The cosmere symbol, with a link to [[cosmere]] instead of [[:File:cosmere symbol.svg]]|width=200px|link=cosmere}}</pre>
  +
| {{image|cosmere symbol.svg|The cosmere symbol, with a link to [[cosmere]] instead of [[:File:cosmere symbol.svg]]|width=200px|link=cosmere}}
  +
|}
  +
  +
; Notes: The <code>height</code> parameter overrides the <code>width</code> parameter. If exact dimensions are required pass <code>width=WxHpx</code> where <code>W</code> is the width & <code>H</code> is the height.
  +
  +
== Articles using Template ==
  +
{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full listing|here|pre=This list is limited to 100 pages}}
  +
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=0|limit=100}}

Latest revision as of 20:12, 16 February 2023


This template should be used on pages to include a thumbnail of an image on a page.

Usage
{{image|file-name.extension|caption}}

The file name parameter is required. The caption is technically optional, but is strongly encouraged. There are also several other optional parameters:

{{image|file-name.extension|caption
|side=center/left/right
|width=100px
|attribute=artist/art-tracer/art-modified
|link=[[File:file-name.extension]]
}}

When copy-pasting the template above, it might be more readable to put it all on the same line; it is split across multiple ones just for clarity. If an optional parameter is not set, it defaults to the first value listed on its line above (height defaults to preserve ratio with the 100px default width).

Usage Examples
Parameter Description Code Example
none when only the file name is passed
{{image|cosmere symbol.svg}}
caption when only the file name and caption are passed
{{image|cosmere symbol.svg|this is the caption}}
this is the caption
side=left pushes the image over to the left, and allows the page to flow around it
{{image|cosmere symbol.svg|side=left|this is the caption}}
this is the caption
side=right pushes the image over to the right, and allows the page to flow around it
{{image|cosmere symbol.svg|side=right|this is the caption}}
this is the caption
attribute=art-tracer
or
attribute=art-modified
changes the attribution of the image to the "tracer" of the image or the person who modified it instead of the original artist.
{{image|cosmere symbol.svg|attribute=art-tracer|this is the caption}}
this is the caption
width=20% changes the width of the image
{{image|cosmere symbol.svg|width=200px|this is the caption}}
this is the caption
height=20% changes the height of the image
{{image|Navani's Ketek glyphs.svg|height=150px|The [[ketek]] "Alight, winds approach deadly approaching winds alight" written in [[glyphs]] and stylized to represent the meeting of the [[Everstorm]] and a [[highstorm]]}}
The ketek "Alight, winds approach deadly approaching winds alight" written in glyphs and stylized to represent the meeting of the Everstorm and a highstorm
link=Cosmere makes the image link to a page instead of its File page
{{image|cosmere symbol.svg|The cosmere symbol, with a link to [[cosmere]] instead of [[:File:cosmere symbol.svg]]|width=200px|link=cosmere}}
The cosmere symbol, with a link to cosmere instead of File:cosmere symbol.svg
Notes
The height parameter overrides the width parameter. If exact dimensions are required pass width=WxHpx where W is the width & H is the height.

Articles using Template[edit]