Template:Image: Difference between revisions
Created page with "<includeonly><!-- -->[[file:{{{1}}}|thumb|{{{side|center}}}|{{#if:{{{height|}}}|x{{{height}}}|{{{width|100px}}}}}<!-- -->|<!-- ARTIST: --><div class="attribution">{{#if:{{{artist|}}}|by {{{artist}}}|}}</div><!-- CAPTION: --> {{#if:{{{2|}}}|{{{2}}}|}} <!-- LINK: -->{{#if:{{{link|}}}|{{!}}link={{{link}}}}}<!-- -->]]</includeonly>" |
No edit summary |
||
| Line 6: | Line 6: | ||
LINK: -->{{#if:{{{link|}}}|{{!}}link={{{link}}}}}<!-- | LINK: -->{{#if:{{{link|}}}|{{!}}link={{{link}}}}}<!-- | ||
-->]]</includeonly> | -->]]</includeonly> | ||
<noinclude> | |||
== Basic Example == | |||
{{Image|Pen.png|A pen nib silhouette.}} | |||
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. | |||
== Example with Artist Attribution == | |||
{{Image|Pen.png|A beautiful sunset|artist=Jane Doe}} | |||
This will display the image "Pen.png" with the caption "A beautiful sunset" and attribution to the artist "Jane Doe". | |||
== Example with Image Link == | |||
{{Image|Pen.png|Click here for more details|link=http://example.com}} | |||
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". | |||
== Example with Custom Size == | |||
{{Image|Pen.png|This is a caption|height=200px}} | |||
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. | |||
</syntaxhighlight> | |||
</includeonly> | |||
Revision as of 21:36, 12 March 2025
Basic Example

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.
Example with Artist Attribution

by Jane Doe
A beautiful sunset
This will display the image "Pen.png" with the caption "A beautiful sunset" and attribution to the artist "Jane Doe".
Example with Image Link

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".
Example with Custom Size

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.
</syntaxhighlight> </includeonly>