Difference between revisions of "Help:Images"

Jump to navigation Jump to search
(Clarifying and moving around when infobox templates are added to new images seeing as we prompt people to add them while uploading. Also adding information about {{a}} template.)
(→‎Using Files: Details on {{image}} template)
 
== Using Files ==
The easiestdefault waymethod tofor insertinserting animages is the {{t|image}} intotemplate. anTo articleuse isthe totemplate, use <code><nowiki>[[File:{{image|FILENAME.EXT]]|caption}}</nowiki></code>.
 
<code>FILENAME.EXT</code> is the filename (and extension) of the image you want; it does not include the <code>File:</code> prefix. <code>caption</code> should be replaced with a caption describing the image; is not ''required'', but it is highly encouraged.
 
Additionally, you may use the following parameters to adjust the placement of the image (remember to separate parameters with a <code>|</code>):
* <code>side</code>: The image alignment defaults to the center of the page; other valid options are <code>side=left</code> and <code>side=right</code>
* <code>height</code>: The image width defaults to 100 pixels and the height re-scales by default to preserve ratio; you can instead set a height in pixels for the image with <code>height=XXXpx</code> (the width will then re-scale to preserve ratio)
* <code>width</code>: The image width defaults to 100 pixels; you can use <code>width=XXXpx</code> to set a width in pixels or <code>width=XX%</code> to set the image to take up a certain percentage of the page width. Using this parameter will override any input for the <code>height</code> parameter; if you want to override the ratio and set both, use <code>width=WWWxHHHpx</code> where <code>WWW</code> is the desired width and <code>HHH</code> is the desired height.
 
If you aren't comfortable using the template, you can use <code><nowiki>[[File:FILENAME.EXT]]</nowiki></code>.
 
<code>FILENAME.EXT</code> is the filename (and extension) of the image. This adds a full size image into the article. Additional parameters may be included, separated by vertical bars (<code>|</code>), to adjust to how the image appears. Some important parameters include:
=== Examples ===
{| width=100% class=wikitable
|-
|
'''{{t|Image}} Example'''
 
{{image|Cosmere_symbol.svg|The [[cosmere]] symbol|side=right|width=200px}}
 
<code><nowiki>{{image|Cosmere_symbol.svg|The [[cosmere]] symbol|side=right|width=200px}}</nowiki></code>
 
A simple thumbnail generated by {{t|Image}}, aligned right and with a 200px width. The template automatically provides the artist attribution and the caption is added underneath that.
|-
|
'''Resized and realigned Example'''
 
<code><nowiki>[[File:Cosmere_symbol.svg|left|200px|the [[cosmere]] symbol|link=Cosmere]]</nowiki></code>
 
[[File:Cosmere_symbol.svg|left|200px|the [[cosmere]] symbol|link=Cosmere]] The image is aligned to the left and resized; no border or room for the caption (supplying one like I did here was pointless). This image links to the "Cosmere" article.
|-
|