Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Incubator escapee wiki:Extended image syntax
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Brief syntax== In brief, the [[Syntax (programming languages)|syntax]] for displaying an image is: :<code><nowiki>[[File:</nowiki>'''''Name'''''|'''''Type'''''<wbr>|'''''Border'''''<wbr>|'''''Location'''''<wbr>|'''''Alignment'''''<wbr>|'''''Size'''''<wbr>|link='''''Link'''''<wbr>|alt='''''Alt'''''<wbr>|page='''''Page'''''<wbr>|lang='''''Langtag'''''<wbr>|'''''Caption'''''<nowiki>]]</nowiki></code>. <code>Plain type</code> means you always type exactly what you see. <code>'''''Bold italics'''''</code> represent a variable, which you replace with its actual value. Of the parameters shown, only '''''Name''''' is essential. Most images should use <code><nowiki>[[File:</nowiki>'''''Name'''''|thumb|alt='''''Alt'''''|'''''Caption''''']]</code> and not specify a size. The other details: * are optional and * can be placed in any order, except for '''''Caption''''' that has to be the last parameter. ; ''Type'' : <code>thumb</code> (or <code>thumbnail</code>; either can be followed by <code>=<var>'''[[#filename|filename]]'''</var></code>), <code>frame</code> (or <code>framed</code>), or <code>frameless</code>. Displays the image with specific formatting (see below). ; ''Border'' : <code>border</code>. Put a small border around the image. ; ''Location'' : <code>right</code>, <code>left</code>, <code>center</code> or <code>none</code>. Determine the horizontal placement of the image on the page. This defaults to <code>right</code> for thumbnails and framed images. ; ''Alignment'' : <code>baseline</code>, <code>middle</code>, <code>sub</code>, <code>super</code>, <code>text-top</code>, <code>text-bottom</code>, <code>top</code>, or <code>bottom</code>. Vertically align the image with respect to adjacent text. This defaults to <code>middle</code>. ; ''Size'' : <code>upright</code> or <code>upright=<var>'''scaling factor'''</var></code>. Scale a thumbnail from its default size by the given factor (default 0.75), rounding the result to the nearest multiple of 10 pixels. The <code>upright</code> option must be used along with the <code>thumb</code> or <code>frameless</code> parameter. Alternatively, and only where absolutely necessary, users' preferences may be disregarded and the size of the image fixed by specifying a size in pixels: <code>'''''Width''''' px</code> or <code>x '''''Height''''' px</code> or <code>'''''Width''''' x '''''Height''''' px</code>. Scale the image to be no greater than the given width or height, keeping its aspect ratio. Scaling up (i.e. stretching the image to a greater size) is disabled when the image is framed. ; ''Link'' : Link the image to a different resource, or to nothing. ; ''Alt'' : Specify the [[alt attribute|alt text]] for the image. This is intended for visually impaired readers. See [[WP:ALT]] for how this should typically differ from the caption. ; ''Page'': Specify a page other than 1 to use for the thumbnail image in multipaged files. ; ''Langtag'' : Specify the [[IETF language tag]] (slang: langtag) for <code>switch</code>-translated [[SVG]] (Scalable Vector Graphics) files. Some SVG files are multilingual; this parameter specifies which language to use. The langtag should be all lowercase (e.g., <code>zh-hans</code> rather than <code>zh-Hans</code>). Defaults to current Wikipedia language in article namespace or <code>en</code> in other namespaces. See {{tl2|sister=Commons:|Translate}}. ; ''Caption'' : Not a keyword, the actual caption text. Must be last option. This is visible if the <code>thumb</code> or <code>frame</code> attribute is used, but may be displayed on [[mouseover]] in other cases.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)