Template:Scalable image
This template uses TemplateStyles: |
This template allows you to include a big image. If the image is too wide, the size of thumbnail frame will be smaller.
Usage
[edit]{{Scalable image|name|image width|caption|box width|alignment|alt=alt text}}
- An
image width
option is required. This specifies the full width at which the image will be displayed, and is distinct from box width (the width of the box on the page). - A
caption
option is optional, and an image frame will be used if a caption is supplied. If the caption contains an equal sign, use the parameter|3=caption
in the place of|caption
. If the caption supplied is exactly equal to image syntax such asthumb
, the image's tooltip will no longer display the caption, but instead default to the name of the image. - The
box width
option is optional, and if given a value in pixels followed by "px", or a value in percent followed by "%", will set the width of the box to that amount. For example, 45% would use 45% of the text section width, (not a percentage of the image width). - The
alignment
option is also optional but requires box width to be defined. If given a value ofright
orleft
, the entire wide image will float to the right or left. If given a value ofnone
the image will not float. - The
alt text
describes the image's visual appearance to visually disabled readers. Please see w:WP:ALT for details.
To hide the tooltip, use |tooltip=no
.
To align the caption, use |align-cap=
.
To remove the outer frame, use |frame=no
.
Example
[edit]Without caption
[edit]{{scalable image|Dew on grass Luc Viatour.jpg|2500px| |alt=Dews on grass}}
smaller
[edit]{{scalable image|Dew on grass Luc Viatour.jpg|500px| |alt=Dews on grass}}
With caption
[edit]{{scalable image|Dew on grass Luc Viatour.jpg|2500px|Dews on grass |alt=Dews on grass}}
Without tooltip
[edit]{{scalable image|Dew on grass Luc Viatour.jpg|2500px|Dews on grass |alt=Dews on grass |tooltip=no}}
TemplateData
[edit]- TemplateData
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.
Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either useTemplateData=1
or useTemplateData=only
on the /doc
subpage and transcluding it with {{Documentation}} into the template. <nowiki>
-tags can be wrapped around the arguments, if required, to avoid templates being expanded.
Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>
-tags into the Wikitext of the template, as described in various Wikipediae.
Wikipedia's help about TemplateData • Commons-specific information
Allows you to include a big image. If the image is too wide, the size of thumbnail frame will be smaller.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Filename | 1 | Name of the file to display. Example: Dew on grass Luc Viatour.jpg | String | required |
Image width | 2 | Give the width in pixels (like: 1600px) that you want the included image to be | String | required |
Caption | 3 | A caption for the image that will be shown below image | String | optional |
Width of frame | 4 | Limit the width of the frame enclosing the picture. Example: "400px" or "40%" | String | optional |
Frame alignment | 5 align | Either of: left, right, center or none.
| String | optional |
Textual alternative | alt | Describes the image's visual appearance to visually disabled readers. Please see WP:ALT for details | String | optional |
Show tooltip | tooltip | Use the value 'no' to make the tooltip of the image not shown inside the frame
| String | optional |
See also
[edit]- {{Wide image}}—with a scrollbar