Image commands

From Allotments4All

Jump to: navigation, search

Main Page

Wiki Commands

Gallery format



Table format

Flowers
150px,Basil
Bartonia.jpg
Balsam HHA.jpg
Acroclinium HA.jpg
,xxx
Abutilon.jpg

More details and examples on embedding internal images into articles

To include an uploaded image in a page, use a link in the form [[image:filename.jpg]] or [[image:filename.png|alt text]]. For uploaded sound files, you can include the download link in a page with [[media:filename.ogg]].

Example: Using [[Image:Broccoli-thumbnail.png]], the image Broccoli-thumbnail.png is included (broccoli is an edible vegetable):

Broccoli-thumbnail.jpg

If the wiki is set to another language than English, the name of the "Image:" namespace might be changed. For German, for example, it's [[Bild:Broccoli-thumbnail.png]]

Alternate Text

By specifying alternate text, you can make the article accessible to the blind, too. You can specify an alternate text after a "|"-sign, e.g. [[Image:Broccoli-thumbnail.png|A cartoon drawing of broccoli]], which will look like this:

A cartoon drawing of broccoli

Layout and resizing

A cartoon drawing of broccoli

Several options can be set when including an image. Those affect the placing of the image, its size or the way the image will be presented. The options are right, left, center, none, sizepx, thumbnail (thumb), frame, and alternate (caption) text.

The options can be combined, and vertical bars ("|") are used to separate options from each other. The options can be put in any order. An unknown option is taken as the caption text. If there are two or more unknown options, the last one upstages the rest: [[Image:Broccoli-thumbnail.jpg|thumb|Canterbury Tales|80px|left|A cartoon drawing of broccoli]]. This is shown on the left; the caption is "A cartoon drawing of broccoli", not "Canterbury Tales".

Here is the description of the options other than the caption text:

right 
Broccoli-thumbnail.jpg
makes the image right-aligned, and text floats to the left: [[Image:Broccoli-thumbnail.jpg|right|70px|]] (shown on the right).
left 
Broccoli-thumbnail.jpg
The image is left aligned, and text floats to the right of the image: [[Image:Broccoli-thumbnail.jpg|left|70px|]] (shown on the left).
center 
The image is centered, and...
Broccoli-thumbnail.jpg
the following text starts below it: [[Image:Broccoli-thumbnail.jpg|center|70px|]] (shown above).
none 
The image is put at the left, and...
Broccoli-thumbnail.jpg
the following text does not float to the right or (naturally) to the left, and starts below it: [[Image:Broccoli-thumbnail.jpg|none|70px|]] (shown above).


Notes:
Broccoli-thumbnail.jpg
The above four options are incompatible. When used combined, the last one overrides the rest: [[Image:Broccoli-thumbnail.jpg|none|right|center|left|70px|]] (shown on the left).
Broccoli-thumbnail.jpg
What is between the last vertical bar and the closing brackets ("]]"), void or not, is taken as the last option, and works as usual. For instance, when the last option is right, the image is right-aligned, and text floats to the left: [[Image:Broccoli-thumbnail.jpg|70px|right]] (shown on the right).
Broccoli-thumbnail.jpg
This text is displayed.
In particular, if the last option is the void text (that is, if there is nothing between the last vertical bar and the closing brackets), the caption is not displayed: [[Image:Broccoli-thumbnail.jpg|thumb|This text is not displayed.|70px|left|]] (shown on the left) and [[Image:Broccoli-thumbnail.jpg|thumb|This text is displayed.|70px|right]] (shown on the right).


sizepx 
Broccoli-thumbnail.jpg
renders a version of the image that's [size] pixels wide (e.g. [[Image:Broccoli-thumbnail.jpg|right|50px|]] shown on the right). Height is computed to keep aspect ratio (i.e. the shape of the image).


Note:
Broccoli-thumbnail.jpg
When there are two or more "size" options, only the last one is valid: [[Image:Broccoli-thumbnail.jpg|right|50px|80px]] (shown on the right).
thumbnail, thumb 
Broccoli-thumbnail.jpg
The Palace of Westminster
The thumbnail (thumb) option generates a thumbnail image. It is automatically resized when the "size" attribute is not specified. Without the options left, center, and none, the image is normally on the right. If the image has a caption text, it is displayed in the lower margin. E.g. [[Image:Broccoli-thumbnail.jpg|thumbnail|left|100px|]] (shown on the left) and [[Image:Broccoli-thumbnail.jpg|thumb|The Palace of Westminster]] (shown on the right).
This is a globe, and take a look at it in the actual size
An "enlarge"-icon is put also in the lower margin of the thumbnail. Both the image itself and the icon link to the image description page with the image in its actual size. The icon shows the link title "Enlarge" in its hoverbox, even in cases where this term does not apply, because it leads from the enlarged image to the one with the actual size. E.g. [[Image:The Earth seen from Apollo 17.jpg|right|thumb|100px|This is a globe, and take a look at it in [[Media:The Earth seen from Apollo 17.jpg|the actual size]].]] (shown on the right).
frame 
A drawing of broccoli
With this option, the embedded image is shown with its actual size enclosed by a frame, regardless of the "thumb" or "size" attribute, and the caption, if any, is visible in the frame. Without the options left, center, and none, the image is normally on the right: [[Image:Broccoli-thumbnail.jpg|frame|thumbnail|50px|A drawing of broccoli]].


With none of the options other than sizepx and alternate (caption) text, an embedded image is rendered inline. Note that the size of the inline images can be reduced but they can not be enlarged.

text text text text text text
[[Image:Broccoli-thumbnail.jpg|150px|A drawing of broccoli]]
text text text text text
[[Image:The Earth seen from Apollo 17.jpg|100px|This is a globe.]]
text text text text

gives

text text text text text text A drawing of broccoli text text text text text This is a globe. text text text text