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 tag

change

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}]]

Keywords

change

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.
  • Upright: Adjusts the size compared to the normal thumbnail size. For example, upright=1.5 would be 1.5 times the normal thumbnail size. Only works with thumb or frameless
  • 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 linking 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.

Examples

change
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:blank.jpg|center|thumb|100px|White]]

 
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]]

 

Details

change

Alignment

change
  • 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
 
Image on 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
 
Image on 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
 
Image on 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 type

change
  • 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

The size of an image can be changed in two ways. The first way is by adding a size in pixels to the image tag. The second way is to set the size to a multiple of the normal image size using the upright keyword.

Pixels

change

To set the size in pixels, add 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]]

Upright

change

It is recommended to set the size to a multiple of the normal image size, instead of using pixels. This can be done using the upright keyword. This helps make the page more accessible (easier to read) for some people, who have adjusted the way they see Wikipedia pages.

To make an image   times the normal size (where n is some number), write upright=n. This only works for thumbnails and frameless images.

Examples of Sizes
     
0.75x size 1x size 1.5x size
[[File:Wikipedia-logo-v2-simple.svg|frameless|upright=0.75]] [[File:Wikipedia-logo-v2-simple.svg|frameless|upright=1]] [[File:Wikipedia-logo-v2-simple.svg|frameless|upright=1.5]]

Caption

change

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.

change

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:

Parameters

change

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.
change