Help:Images

From Astrowiki-en

Jump to: navigation, search

To use an image in Mediawiki, you must first upload the image into the wiki

To learn how easily you can format images in Mediawiki using "wiki markup", please review the chart below. Wiki markup consists of normal characters (like colons, brackets or | pipes) that have special functions, sometimes depending on their position in the line of text.

Formatting Images

To get You type You get
An embedded image
(with alt text)

[[Image:Example.jpg|Sunflowers]]

Sunflowers

A link directly to the image's description page
(with alt text)

[[:Image:Example.jpg|Sunflowers]]

Sunflowers

A link directly to the image's file
(with alt text)

[[Media:Example.jpg|Sunflowers]]

Sunflowers

A thumbnail gallery
(in this case: centered, forced to 100 pixels wide, with alt text)

[[Image:Example.jpg|thumb|center|100px|Sunflowers]]

Sunflowers
Sunflowers


Thumbnail gallery

It's easy to make a gallery of thumbnails with the <gallery> tag. The syntax is:

<gallery>
Image:{filename}|{caption}
{...}
</gallery>

Captions are optional, and may contain links or other formatting, for example:

<gallery>
Image:Example.jpg|Sunflowers
Image:Example.jpg|a link to [[Help:Contents]]
Image:Example.jpg|''italic caption''
</gallery>

is formatted as:


Other options

The full syntax for displaying an image is:

[[Image:{name}|{options}]]

Where options can be zero or more of the following, separated by pipes:

  • thumb, thumbnail, or frame: Controls how the image is formatted
  • left, right, center, none: Controls the alignment of the image on the page
  • {width}px: Resizes the image to the given width in pixels
  • {caption text}

The options can be given in any order. If a given option does not match any of the other possibilities, it is assumed to be the caption text. Caption text can contain wiki links or other formatting.

Personal tools