Help:Images

This article is about how to use images when making a Wikipedia page. To add images to Wikipedia, see Wikipedia:Image use policy.

On Wikipedia, images (pictures) can be used on a page by using the Image tag. This tag uses the name of the image as well as some keywords to know where an image should be shown on a page.

Image tagEdit

To insert an image, insert the following image tag. Replace "Image.jpg" with the file name. Replace {options} with the keywords which you want to use.

[[File:Image.jpg|{options}]]

KeywordsEdit

There are some words (keywords) that are understood by the image tag. These words tell it what to do with the image. Any words it does not know are used as the caption for the image. These words are case-sensitive. They must be typed in all lower case letters. The words can be in any order, but they must be separated by a pipe: |

  • Alignment: left, center, right, none — Controls the alignment (position) of the image on the page.
  • Frame type: frame, frameless, thumb — Controls how the image is formatted.
  • Size: A number followed by px (e.g. 200px) — Resizes the image to the given width in pixels.
  • Vertical alignment: baseline, sub, super, top, text-top, middle, bottom, text-bottom — Controls the vertical alignment of the image on the page.
  • Link: link={destination} — Allows to link to an arbitrary title, URL or just nowhere. (1.14+)
  • Alt text: alt={alternative text} — For changing the alternative text (alt="") of an image. Alt text can only be seen when the image is not shown. (1.14+)
  • Caption: any words that are not keywords are used as the caption. Caption text can contain wiki links or other formatting.

ExamplesEdit

Description You type You get
Embed image
(with alt text)

[[Image:Example.jpg|Sunflowers]]

 

Link to description page

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

Image:Example.jpg
Sunflowers

Link directly to file

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

Media:Example.jpg
Sunflowers

Thumbnail
(centered, 100 pixels
wide, with caption)

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

 
White
Border
(100 pixels)
Results in a very small gray border

[[Image:blank.jpg|border|100px]]

 

Frameless
Like thumbnail, respect user preferences for image width but without border and no right float.

[[Image:Example.jpg|frameless]]

 

DetailsEdit

AlignmentEdit

  • Usable words: left, center, right
  • If no alignment is given, the image will be put on the right side of the page.

When using left or right, the words on the page will wrap around the image. If the center tag is used, the words will be under the image. The center alignment should not be used on most articles.

Examples of positioning
left

This is an example of putting the image on the left of a page.
The tag for doing this is: [[File:Wikipedia-logo-v2-simple.svg|left|Image on left]]
The image name is Wikipedia-logo-v2-simple.svg. The positioning is left and the caption is Image on left.

  • The caption can only be seen when the mouse is placed over the image.
right

This is an example of putting the image on the right of a page.
The tag for doing this is: [[File:Wikipedia-logo-v2-simple.svg|right|Image on right]]
The image name is Wikipedia-logo-v2-simple.svg. The positioning is right and the caption is Image on right.

  • The caption can only be seen when the mouse is placed over the image.
center

This is an example of putting the image in the center of a page.
The tag for doing this is: [[File:Wikipedia-logo-v2-simple.svg|center|Image on center]]
The image name is Wikipedia-logo-v2-simple.svg. The positioning is center and the caption is Image on center.

  • The caption can only be seen when the mouse is placed over the image.

Frame typeEdit

  • Usable words: frame, thumb
  • If no Frame type is chosen, no frame is used.
  • If a Frame type is chosen, the caption is shown under the image.
Examples of Frame types
frame
 
Framed image

This is an example of a framed image.
The tag for doing this is: [[File:Wikipedia-logo-v2-simple.svg|frame|Framed image]]

  • Framed images place a frame around the image and show the caption for the image.
  • The image is shown at full size. If a size is included, it will not be used.
  • Framed images are put on the right side of the screen. If used with left or center, they can be put in another place
thumb
 
Thumbnailed image

This is an example of a Thumbnailed image.
The tag for doing this is: [[File:Wikipedia-logo-v2-simple.svg|thumb|Thumbnailed image]]

  • Thumbnailed images place a frame around the image and show the caption for the image.
  • Thumbnailed images are shown with a maximum size of 200px. If the image is smaller than 200px it will be shown at full size. If a maximum size is included, the image will be shown at that size instead.
  • Thumbnailed images are put on the right side of the screen. If used with left or center, they can be put in another place

SizeEdit

The size of an image can be changed by adding a size in pixels to the image tag. This is done by adding a number followed by the letters px. For example, 150px. 200 pixels (200px) is the normal size used for most images on Wikipedia.

  • Framed images will not be changed by having a size: they are always shown at full size.
  • Thumbnailed pictures will be shown as 200px or the full size of the image (whichever is smaller) unless a size is used.
  • Images with no frame type used will be shown at the full size of the image unless a size is used.
Examples of Sizes
     
100px 200px 250px
[[File:Wikipedia-logo-v2-simple.svg|100px|Image: 100 pixels]] [[File:Wikipedia-logo-v2-simple.svg|200px|Image: 200 pixels]] [[File:Wikipedia-logo-v2-simple.svg|250px|Image: 250 pixels]]

CaptionEdit

Anything that is not a keyword is used as the caption of the image. Captions are only shown on images which have a Frame type used. The caption is also shown when the user's mouse is over the image, with or without a frame type being used. Because keywords are case-sensitive, right is not the same as Right. right is a keyword, Right is used as a caption.

Gallery of imagesEdit

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

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

Note that the image code is not enclosed in brackets when enclosed in gallery tags.
Captions are optional, and may contain wiki links or other formatting.

for example:

<gallery>
Image:Example.jpg|Item 1
Image:Example.jpg|a link to [[Help:Contents]]
Image:Example.jpg
Image:Example.jpg
Image:Example.jpg|''italic caption''
Image:Example.jpg|on page "{{PAGENAME}}"
</gallery>

is formatted as:

ParametersEdit

The gallery tag itself takes several additional parameters:

<gallery {parameters}> {images} </gallery>
  • caption={caption}: sets a caption on the gallery.
  • widths={width}px: sets the widths of the images.
  • heights={heights}px: sets the (max) heights of the images.
  • perrow={integer}: sets the number of images per row.

Related pagesEdit