This page explains how to display images and videos in Wikipedia pages.
<nowiki></nowiki>
The best markup for adding a video to a page in most situations is
<nowiki></nowiki>
File markup begins with the filename, preceded by the File: prefix with both elements enclosed in double square brackets – for example <nowiki></nowiki>. Codes may then be added. Each code must be separated with a pipe (|). Some codes specify a display mode, which is like a preset – it will determine the way the image is displayed and which additional properties can be specified to further customise how the image is displayed. Codes may be in any order – with the exception of the caption, which should be last. Only the filename is required. This must be placed first.
Many existing files use the Image: prefix instead of File:. The rest of the markup is exactly the same. Additionally, Image: may be used with any type of file, not just images.
If an article already has an infobox at the top right, then the usual place for the article's first picture is within the infobox. Many infoboxes require a different syntax than the one described here. For guidance on the other syntax, and how to choose which is correct, see Infobox picture.
The following visual file types may be uploaded:
A file in basic mode does not specify a display mode. Files are displayed at full size by default. Images are displayed inline unless a horizontal alignment is specified.
A file in thumbnail mode uses the codes thumb or thumbnail. This will display a thumbnail with a caption. The default size is 220 pixels wide unless the full size file is smaller. Registered users can specify their own default size if they wish.
In normal circumstances, images are scaled down automatically by Wikipedia's server. This does not happen for animated GIFs. Instead the original animated GIF is downloaded, and whether the image is scaled to fit the allotted space depends on the capabilities of the browser. Videos are not scaled down either, which wastes bandwidth. Use framed mode or upload a lower resolution file.
A file in framed mode uses the codes frame or framed. This will display the file at full size with a caption. Because files are not scaled down, framed mode is not appropriate for large images, but is a good choice for video – provided the video is not too large.
A file in frameless mode uses the code frameless. This will display a thumbnail without a caption. The default size is 220 pixels wide unless the full size file is smaller. Unlike thumbnail mode, images are displayed inline unless a horizontal alignment is specified.
<nowiki></nowiki>'''<span style="color:red;">''Example caption''</span>'''<nowiki></nowiki>
Position the file to the right.
<nowiki></nowiki>'''<span style="color:red;">right</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">left</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">center</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">none</span>'''<nowiki></nowiki>
In normal circumstances, images are scaled down automatically by Wikipedia's server. This does not happen for animated GIFs. Instead the original animated GIF is downloaded, and whether the image is scaled to fit the allotted space depends on the capabilities of the browser. Videos are not scaled down either, which wastes bandwidth. Consider uploading a lower resolution file.
Reduce the width for tall, thin files. This is generally better than specifying a width as it respects user preferences.
<nowiki></nowiki>'''<span style="color:red;">upright</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">upright=''Factor''</span>'''<nowiki></nowiki>
Scale the file to make it the specified number of pixels in width (e.g. 100px).
<nowiki></nowiki>'''<span style="color:red;">''Width''px</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">x''Height''px</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">''Width''x''Height''px</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">alt=''Example alt text''</span>'''<nowiki></nowiki>
Unless the file is public domain attribution must be provided in some other fashion. See Images linking to articles for more information.
<nowiki></nowiki>'''<span style="color:red;">link=''Name of page''</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">link=</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">border</span>'''<nowiki></nowiki>
the bottom of the image with the baseline of the text.
<nowiki></nowiki>'''<span style="color:red;">baseline</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">middle</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">sub</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">super</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">text-top</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">text-bottom</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">top</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">bottom</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">thumbtime=''Time''</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">page=''number''</span>'''<nowiki></nowiki>
<nowiki></nowiki>'''<span style="color:red;">thumb=''Anime stub.png''</span>'''<nowiki></nowiki>
The same template can also align pictures vertically:
File:Bryan-Sewall.jpg|300px|right|alt=1896 Democratic campaign poster with nominees William J. Bryan of Nebraska for President and Arthur Sewall of Maine for Vice President
circle 950 850 700 William J. Bryan
circle 2950 850 700 Arthur Sewall
default 1896 Democrats
This imagemap markup specifies that the title text (tooltips) for the three regions are "William J. Bryan", "Arthur Sewall", and "1896 Democrats", respectively. The alt text for an imagemap region is always the same as its title text; the alt text for the overall image is given in the first line of the imagemap's markup. The underlying image's native dimensions are 3916 × 1980, and the coordinates are given in these dimensions rather than in the 300px resizing. As described in the , regions can be specified as circles, rectangles, and arbitrary polygons, and the blue "i" icon can be moved or suppressed. Also, the image can be specified as a "thumb" or "frame", which means it has alt text and a caption in the usual way, with a double-rectangle icon instead of the blue "i" icon .
There is no one standard way of producing a gallery. The options available are:
You can also link directly to the file using "Media:" instead of "File:".
In both cases piped links also work.