This will display an image with the filename "Pen.png" and the caption "This is a caption". No artist attribution will be shown because no "artist" parameter is provided.
| ''None'' || Only the file name is passed. || <pre>{{Image|Pen.png}}</pre> || {{Image|Pen.png}}
This will display the image "Pen.png" with the caption "A beautiful sunset" and attribution to the artist "Jane Doe".
|-
| ''Caption'' || File name and caption are passed. || <pre>{{Image|Pen.png|This is a caption}}</pre> || {{Image|Pen.png|This is a caption}}
== Example with Image Link ==
|-
| <code>side=left</code> || Pushes the image over to the left, allowing text to flow around it. || <pre>{{Image|Pen.png|This is a caption|side=left}}</pre> || {{Image|Pen.png|This is a caption|side=left}}
{{Image|Pen.png|Click here for more details|link=http://example.com}}
|-
| <code>side=right</code> || Pushes the image over to the right, allowing text to flow around it. || <pre>{{Image|Pen.png|This is a caption|side=right}}</pre> || {{Image|Pen.png|This is a caption|side=right}}
This will display the image "Pen.png" with the caption "Click here for more details" and make the image a clickable link to "http://example.com".
|-
| <code>height=200px</code> || Sets the height of the image. If set, the width will adjust automatically to maintain aspect ratio. || <pre>{{Image|Pen.png|This is a caption|height=200px}}</pre> || {{Image|Pen.png|This is a caption|height=200px}}
== Example with Custom Size ==
|-
| <code>width=200px</code> || Sets the width of the image. If set, the height will adjust automatically to maintain aspect ratio. || <pre>{{Image|Pen.png|This is a caption|width=200px}}</pre> || {{Image|Pen.png|This is a caption|width=200px}}
{{Image|Pen.png|This is a caption|height=200px}}
|-
| <code>link=URL</code> || Makes the image clickable, linking it to a specific URL. || <pre>{{Image|Pen.png|Click here for more details|link=http://example.com}}</pre> || {{Image|Pen.png|Click here for more details|link=http://example.com}}
This will display the image "Pen.png" with the caption "This is a caption" and set the height of the image to 200px, while the width will adjust automatically to maintain aspect ratio.
|}
== Explanation of Parameters ==
* '''1st parameter (image name)''': The file name of the image you want to display (e.g., `Pen.png`).
* '''2nd parameter (caption)''': The text that will be displayed under the image as a caption.
* '''artist (optional)''': The name of the artist to attribute the image to (e.g., `artist=Jane Doe`). If this parameter is not provided, no artist attribution will be shown.
* '''link (optional)''': The URL you want the image to link to when clicked (e.g., `link=http://example.com`).
* '''height (optional)''': The height of the image (e.g., `height=200px`).
* '''side (optional)''': The alignment of the image (e.g., `side=left`, `side=right`, or `side=center`). Default is centered.
; Notes: The <code>height</code> parameter overrides the <code>width</code> parameter. To specify both width and height, pass <code>width=WxHpx</code> where <code>W</code> is the width and <code>H</code> is the height.
</syntaxhighlight>
</syntaxhighlight>
</includeonly>
</includeonly>
Revision as of 21:41, 12 March 2025
Basic Example
Image Usage Examples
Usage Examples
Parameter
Description
Code
Example
None
Only the file name is passed.
{{Image|Pen.png}}
Caption
File name and caption are passed.
{{Image|Pen.png|This is a caption}}
This is a caption
side=left
Pushes the image over to the left, allowing text to flow around it.
{{Image|Pen.png|This is a caption|side=left}}
This is a caption
side=right
Pushes the image over to the right, allowing text to flow around it.
{{Image|Pen.png|This is a caption|side=right}}
This is a caption
height=200px
Sets the height of the image. If set, the width will adjust automatically to maintain aspect ratio.
{{Image|Pen.png|This is a caption|height=200px}}
This is a caption
width=200px
Sets the width of the image. If set, the height will adjust automatically to maintain aspect ratio.
{{Image|Pen.png|This is a caption|width=200px}}
This is a caption
link=URL
Makes the image clickable, linking it to a specific URL.
{{Image|Pen.png|Click here for more details|link=http://example.com}}
Click here for more details
Notes
The height parameter overrides the width parameter. To specify both width and height, pass width=WxHpx where W is the width and H is the height.