Template:Image
Documentation
Usage
This template is used to display images with a consistent style, allowing for optional width and caption parameters.
To use this template, insert the following code into your page:
{{Image|filename|width=optional_width|caption=optional_caption}}
- filename – The name of the image file to display.
- width (optional) – The width of the image (default is 200px).
- caption (optional) – The caption to display below the image.
Examples
Example 1: Basic usage
{{Image|Example.jpg}}
This will display the image `Example.jpg` with the default width of 200px and no caption.
Example 2: Custom width
{{Image|Example.jpg|width=300px}}
This will display the image `Example.jpg` with a width of 300px and no caption.
Example 3: Custom width and caption
{{Image|Example.jpg|width=300px|caption=This is an example image}}
This will display the image `Example.jpg` with a width of 300px and the caption "This is an example image".
Template Code
<div style="float: right; clear: both; margin: 1em 0 1em 1em; width: {{{width|200px}}};">
<div class="thumb" style="width: {{{width|200px}}};">
<div class="thumbinner">
[[File:{{{1}}}|thumb|{{{width|200px}}}|{{{caption|}}}]]
</div>
</div>
</div>
Additional Notes
- Ensure the image file is uploaded to the wiki.
- You can adjust the default width by changing the `200px` value in the template code.
- This template helps maintain a consistent look for images across the wiki.
See Also
- Help:Images – For more information on uploading and managing images.
- Template:Documentation – For information on how to document templates.