Difference between revisions of "Template:Image"

From The Coppermind
Jump to navigation Jump to search
(fixed tracer instructions)
m (I have no idea why and I know it doesn't really match what you do for a tracer, but it's art-modified, not art-modifier. Also tweaked usage examples to be on one line, since that's what we do, and to actually use the template)
Line 11: Line 11:
 
This template should be used on pages to include a thumbnail of an image on a page.
 
This template should be used on pages to include a thumbnail of an image on a page.
   
; Usage: {{t|{{lc:{{PAGENAME}}|}}|file-name.png|caption}}
+
; Usage: {{t|{{lc:{{PAGENAME}}|}}|file-name.extension|caption}}
   
The file name parameters is required. Caption is, technically optional but strongly encouraged. There are several optional parameters:
+
The file name parameter is required. The caption is technically optional, but is strongly encouraged. There are also several optional parameters:
   
 
<pre>
 
<pre>
{{image| file-name.png | caption |
+
{{image|file-name.extension|caption
|side=center|left|right
+
|side=center/left/right
 
|width=100px
 
|width=100px
|attribute=artist|art-tracer|art-modifier
+
|attribute=artist/art-tracer/art-modified
  +
|link=[[File:file-name.extension]]
|link=
 
 
}}
 
}}
 
</pre>
 
</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.
+
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%"
 
{| class="wikitable" style="width: 100%"
Line 33: Line 33:
 
|-
 
|-
 
|style="text-align: center;"| ''none'' || when only the file name is passed
 
|style="text-align: center;"| ''none'' || when only the file name is passed
| <pre>{{image| cosmere symbol.svg}}</pre>
+
| <pre>{{image|cosmere symbol.svg}}</pre>
  +
| {{image|cosmere symbol.svg}}
| [[file: cosmere symbol.svg|thumb|center|100px|<div class="attribution">by [[Isaac Stewart]]</div>]]
 
 
|-
 
|-
 
|style="text-align: center;"| ''caption'' || when only the file name and caption are passed
 
|style="text-align: center;"| ''caption'' || when only the file name and caption are passed
| <pre>{{image| cosmere symbol.svg | this is the caption}}</pre>
+
| <pre>{{image|cosmere symbol.svg|this is the caption}}</pre>
| [[file: cosmere symbol.svg|thumb|center|100px|<div class="attribution">by [[Isaac Stewart]]</div> this is the caption ]]
+
| {{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
 
|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
+
| <pre>{{image|cosmere symbol.svg|side=left|this is the caption}}</pre>
| this is the caption
+
| {{image|cosmere symbol.svg|side=left|this is the caption}}
}}</pre>
 
| [[file: cosmere symbol.svg|thumb|left|100px|<div class="attribution">by [[Isaac Stewart]]</div> 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
 
|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
+
| <pre>{{image|cosmere symbol.svg|side=right|this is the caption}}</pre>
| this is the caption
+
| {{image|cosmere symbol.svg|side=right|this is the caption}}
}}</pre>
 
| [[file: cosmere symbol.svg|thumb|right|100px|<div class="attribution">by [[Isaac Stewart]]</div> this is the caption ]]
 
 
|-
 
|-
|style="text-align: center;"| <code>attribute=art-tracer</code> || changes the attribution of the image to the "tracer" of the image instead of the original artist. Also works with <code>modifier</code> in place of <code>tracer</code> for modified files
+
|style="text-align: center;"| <code>attribute=art-tracer</code><br />or<br /><code>attribute=art-modifed</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
+
| <pre>{{image|cosmere symbol.svg|attribute=art-tracer|this is the caption}}</pre>
| this is the caption
+
| {{image|cosmere symbol.svg|attribute=art-tracer|this is the caption}}
}}</pre>
 
| [[file: cosmere symbol.svg|thumb|left|100px|<div class="attribution">by [[User: WeiryWriter]]</div> this is the caption ]]
 
 
|-
 
|-
 
|style="text-align: center;"| <code>width=20%</code> || changes the width of the image
 
|style="text-align: center;"| <code>width=20%</code> || changes the width of the image
| <pre>{{image| cosmere symbol.svg |width=200px
+
| <pre>{{image|cosmere symbol.svg|width=200px|this is the caption}}</pre>
| this is the caption
+
| {{image|cosmere symbol.svg|width=200px|this is the caption}}
}}</pre>
 
| [[file: cosmere symbol.svg|thumb|center|200px|<div class="attribution">by [[Isaac Stewart]]</div> this is the caption ]]
 
 
|-
 
|-
 
|style="text-align: center;"| <code>height=20%</code> || changes the height of the image
 
|style="text-align: center;"| <code>height=20%</code> || changes the height of the image
| <pre>{{image| Navani's Ketek glyphs.svg |height=150px
+
| <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>
| The ketek "Alight, winds approach deadly approaching winds alight." written in glyphs and stylized to represent the meeting of the Everstorm and a highstorm.
+
| {{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>
 
| [[file: Navani's Ketek glyphs.svg|thumb|center|x150px|<div class="attribution">by [[Isaac Stewart]]</div> 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
 
|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}}</pre>
}}</pre>
 
 
| {{image|cosmere symbol.svg|The cosmere symbol, with a link to [[cosmere]] instead of [[:File:cosmere symbol.svg]]|width=200px|link=cosmere}}
 
| {{image|cosmere symbol.svg|The cosmere symbol, with a link to [[cosmere]] instead of [[:File:cosmere symbol.svg]]|width=200px|link=cosmere}}
 
|}
 
|}

Revision as of 05:27, 20 August 2020


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 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-modifed
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