Jump to content

Wikipedia:Extended image syntax

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by JeLuF (talk | contribs) at 22:34, 29 January 2004. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Old syntax

The old syntax for images is [[Image:Westminstpalace.jpg|alternate text]] whis is rendered inline and the alternate text is used as alt=-attribute for use as mouse popup and for screen reader.

Example

alternate text

New syntax

The Westminster Palace

The new syntax is backward compatible, so articles don't have to be changed. Parameters indicating how to render the image can be given, using the syntax [[Image:Westminstpalace.jpg|options|alternate text]]. Available options are:

thumbnail, thumb
generates a thumbnail image floating to the right, using the alternate text for both alt=-attribute and as a caption. An "enlarge"-icon is added. Example: [[Image:Westminstpalace.jpg|thumbnail|The Westminster Palace]]
right
make the image right-aligned, can be used with and without specifying thumb
left
same as above, but left aligned.
none
The image will be rendered inline, even if the thumbnail-option is set
sizepx
render a thumbnail version of the image that's [size] pixels wide (e.g. '150px'). Height is computed to keep aspect ratio.


Vertical bars are used to separate options from each other and from the alternate text. The last option is used as alternate text. Unknown options are skipped.

Westminster palace
Westminster palace
The Palace

The options can be combined, e.g. as [[Image:Westminstpalace.jpg|left|80px|Westminster palace]] or [[Image:Westminstpalace.jpg|thumb|80px|The Palace]].

The option none can be used to have thumbnails without left- or right-alignment. This is probably most useful for tables. This is an example:

How to use none
London's palaces
Westminster Palace
From the Thames
Buckingham Palace
Queen's home