Predefinição:Image
Esta predefinição define a tabela "Imageinfo". Ver tabela.
This template "safely" displays an image, meaning that no red link will be produced if the image doesn't exist.
Additionally, omitting the file extension causes the template to automatically check if a GIF file with the provided name exists and display that if it does. If no GIF file exists, the template falls back to the PNG file, again checking if it exists and only displaying that if it does.
Usage
{{ image | <file name> | <[[File:]] syntax options> | size = <image size> | scale = <image scaling factor> | maxsize = <image size limit> | redlink = y/yes }}
- First unnamed parameter
Name of the file, with or without file extension.
- [[File:]] syntax options
All parameters of the regular [[File:]] syntax can be used, like caption and link.
- size
Overrides the size option from the [[File:]] syntax. A scaling factor can be appended with an asterisk. For instance, with |20px|size=40px*0.75 the 20px from the [[File:]] syntax will be ignored and the 40px*0.75 will be interpreted as 30px.
- scale
Scales the image based on its size, e.g. scale=0.5 halves the image size.
- maxsize
Uses the same syntax as the size option from the [[File:]] syntax: <width>px, <height>px, or <width>x<height>px. Note: this is applied after scaling.
- redlink
For files that do not exist, this template outputs nothing by default. If this parameter is set, this template will produce a red link for the file.
Examples
| Code | Result |
|---|---|
{{image|Wood}} |
|
{{image|Soul of Light}} |
|
{{image|Soul of Light.png}} |
|
{{image|Nonexistent image}} |