MediaWiki User Guide: Adding multimedia

Main Page | Recent changes | Random | Special
Edit this page | Page history | Discuss this page
 


Page type: Uncategorised

<- MediaWiki User Guide

To add an image, first upload it using the Special:Upload link in the system bar (usually to the left of the page). By default, MediaWiki users who are logged in can upload files.

To add the uploaded image to an article, write something like [[Image:My Image's Name.format]]. There are some other possiblities, like putting the image in a floated div tag (don't worry too much about what this means). To get some ideas, just look at the source of some pages with images in.

Apart from text, MediaWiki supports the following media inline:

Also other files can be uploaded, and pages can then link to them. These files are also called "image" by the system, e.g. in "image description page". They can have a size of up to 2 megabytes (but please be reasonable).

The most common is:

Remarks:

Suggestions for future formats include:

For the basics of using multimedia, see also MediaWiki User Guide: Starting a new page.

Contents

Uploading

On most browsers, you will see a "Browse..." button, which will bring up your operating system's standard file open dialog. Choosing a file will fill the name of that file into the text field next to the button. You must also check the box affirming that you are not violating any copyrights by uploading the file. Press the "Upload" button to finish the upload. This may take some time if you have a slow internet connection.

The preferred formats are JPEG for photographic images, PNG for drawings and other iconic images, and OGG for sounds. Please name your files descriptively to avoid confusion.

Please note that as with wiki pages, others may edit or delete your uploads if they think it serves the project, and you may be blocked from uploading if you abuse the system.


When a file is uploaded with the same name as an existing one, the old one is replaced. If that is not the intention one has to check in advance that the same name does not exist yet, because currently the system does not warn against overwriting. For example, click on http://meta.wikipedia.org/wiki/Image:A and replace the A in the address bar of the browser with the file name. Alternatively use the search feature in Special:Imagelist. Wikimedia specific: See also Meta:Image use policy#Image titles

When a media file is replaced by uploading a new one with the same name (e.g. an image in an article is replaced), this does not show up in the page history of the article, nor in the Related Changes of the article, nor in the revision history of the image description page (unless the description section is also changed). However, it is recorded in the Image History section of the image description page, and it changes meta:Upload log. Therefore, to watch changes in images in an article, it is not sufficient to watch the article itself and the image description pages ("watching" in the sense of putting on the list of "watched pages"), but one should watch the Upload log also.

Special:Imagelist provides the same information as the Upload log, but it uses the User local time instead of the default time (set to UTC for Wikimedia projects). In addition it gives the file sizes. Further it allows loading of portions and sorting by size in addition to sorting by date, and it has not only links to the image description pages, but also directly to the images.

Embedding images into articles

To include the image in a page, use a link in the form [[image:file.jpg]] or [[image:file.png|alt text]] or [[media:file.ogg]] for sounds.

Example: Using [[Image:Canterbury_Tales.png]], the image Canterbury_Tales.png is included:

Image:Canterbury Tales.png

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:Canterbury_Tales.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:Canterbury_Tales.png|An old medieval drawing showing many people sitting around a large table]], which will look like this:

Image:Canterbury Tales.png

Layout and resizing

Several options can be set when including an image. Those affect the placing of the image, it's size or the way the image will be presented. Those options are specified between the image name and the alternate text: [[Image:Canterbury_Tales.png|options|alternate text]]. Available options are:

Image:Canterbury Tales.png
An image from the canterbury tales
thumbnail, thumb
generates an automatically resized thumbnail image, normally on the right, with the caption text displayed directly underneath. An "enlarge"-icon is added. Example: [[Image:Canterbury_Tales.png|thumbnail|An image from the canterbury tales]]
right
make the image right-aligned, can be used with and without specifying thumb
left
same as above, but left aligned.
center
same as above, but centered.
none
The image will be rendered inline, even if the thumbnail-option is set
sizepx
render a thumbnail version of the image that's [size] pixels wide (e.g. '150px'). Height is computed to keep aspect ratio (i.e. the shape of the image).

Vertical bars are used to separate options from each other and from the caption text. Unknown options are skipped and the last option is used as the caption text.

The options can be combined, e.g. as [[Image:Canterbury_Tales.png|left|80px|An old medieval drawing showing many people sitting around a large table]] (shown on the left).


See en:Wikipedia:Multimedia