Template:Avatar/doc
Outputs a user's avatar or profile picture. It pulls the image (via Cargo) from the user's infobox.
Usage[edit source]
{{avatar|user's name or ID (required)|size=default: 100px|format="frameless" or "border frameless" or "frame" or "thumb" or (nothing)|horizontal= |vertical= |link= |alt= |class= |caption= }}
- Using an ID is recommended, as names are more likely to change. If using a name, it must match the name at the very top of the user's infobox. If using an ID, it must match the first ID in the Discord ID field of the infobox.
- The default size of the image is 100px wide. To change this, set the size parameter to either (width)px, x(height)px, or (width)x(height)px. For example:
|size=200x200px
- To make the image a thumbnail image (the type that is usually used in articles), set the format parameter to
thumb
. - All of the named parameters just implement image options. For more info on how to use image options, check out the MediaWiki image guide.
- For a detailed explanation of all parameters, check out the TemplateData section below.
Examples[edit source]
{{avatar|833403765461745704}}
(which is Candy's ID) outputs:
{{avatar|244964867843424276 |size=120x120px |format=thumb |horizontal=right |caption=Saucy's avatar}}
outputs:
TemplateData[edit source]
Outputs a user's avatar or profile picture. It pulls the image from the user's infobox.
Parameter | Description | Type | Status | |
---|---|---|---|---|
user | 1 | The name or Discord ID of the user. ID is recommended, as names are more likely to change. If using a name, it must match the name at the very top of the user's infobox. If using an ID, it must match the first ID in the Discord ID field of the infobox.
| String | required |
size | size | The size of the image. To set only the width, use (width)px. To set only the height, use x(height)px. To set the width and height, use (width)x(height)px.
| String | suggested |
format | format | How the rendered image is formatted and embedded in the page. Most images in article body texts have the "thumb" format. Leave this undefined for basic image behavior. Must be one of: thumb, frameless, border frameless, frame, (undefined)
| String | suggested |
horizontal alignment | horizontal | Controls the horizontal alignment of the image within text. Must be one of: left, right, center, none, (undefined)
| String | optional |
vertical alignment | vertical | Controls the vertical alignment of a non-floating inline image with the text before or after the image. Must be one of: baseline, sub, super, top, text-top, middle, bottom, text-bottom, (undefined)
| String | optional |
link | link | Sets what page to take you (either internal or external) when you click on the image.
| Page name | optional |
alt | alt | The alt text of the image. Used to describe the image for screenreaders or when the browser cannot load the image. | Content | optional |
class | class | The HTML classes that the <img> element will have. | String | optional |
caption | caption | The caption that appears under the image. Only appears if the format parameter is set to "frame" or "thumb". | Content | suggested |
default | default | What to output if no image could be found.
| String | optional |