Help:Images and other uploaded files

From The Scuba Wiki

Jump to: navigation, search
MediaWiki Handbook: Contents, Readers, Editors, Moderators, System admins +/-

You can upload files through MediaWiki and embed them in textual pages. In other words, to embed an image, the image file has to be uploaded. Also other files can be uploaded, see below. In earlier versions of MediaWiki, the term "image" was used for any uploaded file; the current version uses the term (and namespace) "file:" instead.

When a file is uploaded, a file page (also called "image description page") will be created, with a page name consisting of the file name (including extension), prefixed with "File:" (or in general the value of variable {{ns:File}} (MediaWiki 1.14 following) or {{ns:Image}} (MediaWiki 1.13 or earlier).

Media files like images can be embedded into text using the regular internal link syntax. Images can also be resized to fit better within the page, see below.

A group of wikis may have designated one "preferred wiki" to upload files to, with sharing of those files enabled. Among Wikimedia wikis, Wikimedia Commons works for this. If images are uploaded to Wikimedia Commons, they can be used in all Wikimedia wikis. Images uploaded on another wiki (e.g. Wikipedia) can only be used in pages of that wiki. Thus this should be done only if there is a special reason for it, such as locally replacing an image from Commons with a local version without changing the links.

Images can also be produced by the system from specifications in wikitext:

Contents

Supported file types

By default, MediaWiki only allows you to upload certain types of files (extensions gif, jpg, jpeg, ogg and png). This is managed by the orders in includes/DefaultSettings.php [2]: <source lang="php"> /**

* This is the list of preferred extensions for uploading files. Uploading files
* with extensions not in this list will trigger a warning.
*/

$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg' );

/** Files with these extensions will never be allowed as uploads. */ $wgFileBlacklist = array(

   # HTML may contain cookie-stealing JavaScript and web bugs
   'html', 'htm', 'js', 'jsb', 'mhtml', 'mht',
   # PHP scripts may execute arbitrary code on the server
   'php', 'phtml', 'php3', 'php4', 'php5', 'phps',
   # Other types that may be interpreted by some servers
   'shtml', 'jhtml', 'pl', 'py', 'cgi',
   # May contain harmful executables for Windows victims
   'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' );

/** Files with these mime types will never be allowed as uploads

* if $wgVerifyMimeType is enabled.
*/

$wgMimeTypeBlacklist= array(

   # HTML may contain cookie-stealing JavaScript and web bugs
   'text/html', 'text/javascript', 'text/x-javascript',  'application/x-shellscript',
   # PHP scripts may execute arbitrary code on the server
   'application/x-php', 'text/x-php',
   # Other types that may be interpreted by some servers
   'text/x-python', 'text/x-perl', 'text/x-bash', 'text/x-sh', 'text/x-csh',
   # Windows metafile, client-side vulnerability on some systems
   'application/x-msmetafile'

);

/** This is a flag to determine whether or not to check file extensions on upload. */ $wgCheckFileExtensions = false;

/**

* If this is turned off, users may override the warning for files not covered
* by $wgFileExtensions.
*/

$wgStrictFileExtensions = true;

/** Warn if uploaded files are larger than this (in bytes), or false to disable*/ $wgUploadSizeWarning = false; </source>

Take in to account that there is a blacklist of file extensions and mime types. For reasons of security, executable programs are not allowed by default. Also some file types that could be uploaded in the past can no longer be uploaded, but the files already uploaded can still be used.

SVG images uploaded earlier can be linked to, but not be directly embedded, e.g. Media:Wikipedia3fnlc1.svg (image description page) - see also m:SVG image support.

For videos see m:Video policy.

Uploading

To upload a file, in general, go to Commons, log in there, and upload the file using the upload link commons:Special:Upload. In the menu on the left under "toolbox" you will have a link named "Upload file". If you want to upload the file to one of the other wikis, you can follow the same steps as at Commons, but be sure to refer to the local guidelines.

Before uploading please ensure that you have rights to upload and redistribute the file(s) in question, and that they comply with any further licensing requirements of the Wikimedia Commons project and other criteria for inclusion. 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.

The preferred formats are JPEG for photographic images with millions of colors and shades; PNG for fixed-color pixelated images such as icons; SVG for structured drawings, logos; and OGG for audio.

Once you got to the upload page, 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. Upload the file under a suitable name, because renaming the file after uploading is not possible. The file name doesn't need to be the same as the file name stored on your computer. Please name your files descriptively to avoid confusion and make sure that the file name has the proper extension. The file names are case-sensitive (this applies even for the file name extension) except, in most wikis, for the first character.

When choosing a name for a file on Commons, do not use a name that is already in use on any project on which the file may be used. This is because a file on Commons with the same name as the one on the local is not accessible for embedding in the local project. However, if the new file on Commons should replace the local ones, and the local ones will therefore be deleted, you may use the same name.

You must also check the box affirming that you are not violating any copyrights by uploading the file. Press the "Upload file" button to finish the upload. This may take some time if you have a slow internet connection.

When a file is uploaded with the same name as an existing one, the old one is replaced, and the system will warn against overwriting. 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 m:Upload log. Therefore, to watch changes in images in an article, it is not sufficient to watch the article itself. Watching the image description pages will help you find the change in the file (from MediaWiki 1.13).

Protection of an image page is automatically also protection of the image itself: i.e. a new image under the name of the existing image can only be uploaded by a sysop.

When replacing or deleting a file on Commons, all projects that use the file are affected. Therefore it is important that the image page on Commons is linked to the local image pages of that file on all projects that use it. On these, even if they have never been created explicitly and therefore have an empty editable part, the "file links" section shows the local pages that use the file.

See commons:Commons:First steps for more detail.

Special:Imagelist provides the same information as the Upload log, but it uses the user's local time instead of the default time (set to Coordinated Universal Time 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 internal files

To embed an internal file in a text, you just have to specify its file name with the internal link syntax ([[ ]]). Thus, [[image:tst.png]] gives File:Tst.png.

Here, "internal" refers to both the same project and Commons. An image name is assumed to refer to the one in the same project if it exists there, otherwise to one on Commons. If neither exists a link to the upload page appears, with class="new" ("red link"). The link is rendered the same as one to the edit page of the non-existing image page, except that the former shows the canonical form of the pagename.

Only images proper can be automatically presented, sound is not automatically played.

An embedded internal image automatically links to the image page, which shows the full image, or, depending on preferences, a reduced version with a link to the full version. The page also provides info about the image.

Images on MediaWiki:Bad image list cannot be embedded; they appear as a regular link to the image page. Exceptions to allow a listed image on particular relevant articles can be added. See, for example, w:en:MediaWiki:Bad image list.

Options

The internal-link style markup for embedding a file can take various options separated with a pipe character ("|"). In brief, they are [[Image:{name}|{type}|{location}|{size}|{upright}|{border}|{caption}]].

Type
'thumb' / 'thumbnail' or 'frame'. Causes image to be displayed with specific formatting (see below).
Location
'right', 'left', 'center' or 'none'. Determines placement of the image on the page. Defaults to 'right', when combined with 'thumb' or 'frame'.
Size
{width}px or {width}x{height}px, scales the image to be no greater than the given width and height, keeping its aspect ratio.
Upright
for use only on images that are taller than they are wide. This scales the image differently, considering both width and height instead of only width.
Border
adds a border around the image.
Caption
Any element which cannot be identified as one of the above is assumed to be caption text.
Link
To allow an image to link to an arbitrary title, URL or just nowhere.
Alt
For changing the alternative text (alt="") of an image.

Type

Image embedding syntax without type specification displays the image inline without any frame or visible caption.

For example, [[image:tst.png|abc]] gives abc. The caption substitutes the 'title' attribute of the generated HTML image tag.

To add the uploaded image to an article as a thumbnail, one can write [[Image: file name including extension |thumb|caption]].

Therefore [[image:tst.png|thumb|abc]] and [[Image:Gelderland-Position.png|thumb|abc]] respectively give the images on the right. Both the images themselves and the "enlarge" icon in the frame link to the image pages. Template:-

You can also specify the size of the image. However, the default thumbnail width can be set in the preferences, so typically it is better not to specify "px", in order to respect the users' preferences. If the original size of the image is smaller than the specified size, it will not be enlarged.

Thus [[image:tst.png|thumb|50px|abc]] is not enlarged, while [[Image:Gelderland-Position.png|thumb|50px|abc]] is shown at 50px-wide (see on the right). Template:-

If you use the "frame" option the image will not be scaled, and size specifiers will be invalid. See [[image:tst.png|frame|abc]] and [[Image:Gelderland-Position.png|frame|50px|abc]] on the right for example. Template:-

Use <br clear="all" />, or on projects that have Template:Clr or Template:- {{clr}} or {{-}} to stop the text floating around the image.

Location

The location of the image within the page can be specified as 'right', 'left', 'center' or 'none'. Once specified, you cannot align the images horizontally, unless you use other markups such as those for a table.

For example, [[image:tst.png|left]] puts the image at the left; text that follows floats to the right of it; if a second image immediately comes after the first, the second vertically follows the first.

[[image:tst.png|left]][[image:tst.png|left]]
''Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
[[image:tst.png|left]]
euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.''

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh

euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Template:-

Compare this with

[[image:tst.png]][[image:tst.png]]
''Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
[[image:tst.png]]
euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.''

File:Tst.pngFile:Tst.png Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh File:Tst.png euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Template:-

[[image:tst.png|thumb|left]] or [[image:tst.png|frame|left]] also works.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

Template:-

If you specify "right", the image is placed at the right.

[[image:tst.png|right]]
''zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet 
dolore magna aliquam erat volutpat.''

zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Template:-

When used with a type specifier, the result is the same with when you did not specify any location.

[[image:tst.png|thumb|right]]
''zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet 
dolore magna aliquam erat volutpat.''

zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Template:-

You can also combine them.

[[image:tst.png|left]][[image:tst.png|right]]
''zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet 
dolore magna aliquam erat volutpat.''

zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Template:-

[[image:tst.png|thumb||left]][[image:tst.png|thumb]]
''zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet 
dolore magna aliquam erat volutpat.''

zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Template:-

With [[image:tst.png|none]], the image is put at the left, and text that follows starts below it, not floating to its right.

[[image:tst.png|none]]
''Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat,
vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim
qui blandit praesent lupta''

Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent lupta

Size

The size of the images can be reduced and enlarged by specifying with px. You can either specify its width or width and height. In the latter case the image will keep its original aspect ratio: either the width or the height will be equal to the specified maximum, whichever allows the other to be <= the maximum.

Therefore, [[image:tst.png|40px|abc]] gives abc and [[image:tst.png|70x60px|abc]] gives abc.

Or

text [[image:Quill and ink.png]] text [[image:Quill and ink.png|5px|]]
text [[image:Quill and ink.png|100px|demo]] text

gives

text File:Quill and ink.png text File:Quill and ink.png text demo text

Caption

Giving a caption is strongly recommended for the sake of accessibility. Inline images cannot have a caption, but they can have a "title"-attribute (often misidentified as the "alt" attribute, which has a different purpose), which is shown in the hoverbox (in the cases above, for the image it is the same as the caption, and for the enlarge icon it is "Enlarge").

Be careful not to place a pipe character ("|") at the end of the syntax, unless you are doing it on purpose. Because of the piped link function, if the syntax ends with a pipe character, the file name will be treated as the caption.

[[image:tst.png|abc]]
[[image:tst.png|abc|]]
[[image:tst.png|40px|abc]]
[[image:tst.png|40px|abc|]]
[[image:tst.png|abc|40px]]
[[image:tst.png|abc|40px|]]

abc File:Tst.png abc File:Tst.png 40px File:Tst.png

File:Middle east.jpg
Middle East; for more detailed pdf-version see [1]

The caption can contain links. See right for an example. Template:-

Link

Important note: This should only be used with images that don't require attribution (mostly Public Domain images). Other images must link to the image description page, otherwise they violate copyrights
Note: This (appears to) work only with non-thumbnailed images.
  • Without link: [[Image:Pic.jpg|link=]]
  • With internal link: [[Image:Pic.jpg|link=Main_Page]]
  • With external link: [[Image:Pic.jpg|link=http://google.com/]]

Above methods does not work with some versions with thumb and caption. Instead try brackets;

  • [[Image:Pic.jpg|thumb|caption [link=http://google.com/] ]]

Alt

[[Image:Pic.jpg|alt=This is displayed if the image isn't shown! Furthermore, IE may show this as tooltip.]]

Gallery

The gallery-tag is a quick way to show thumbnails in a number of columns. The images will have a single fixed width. The gallery-tag also allows text to take the position of an image. The resulting HTML is that of a table with class="gallery", with cells with class="gallerybox".

Each entry is of the form File:image name or File:image name|caption, possibly with links.

A title to the gallery can be given with "gallery caption" parameter. The number of images per row can be set by "perrow"; the default is 4, but perrow is ignored on Commons (as of 2009-01-15). The width and height per image ("widths" and "heights") can be set as well. The height of the caption depends on the image width and varies per image with the length of the caption. The height of each table row is the maximum height needed in that row for an image with a caption.

Example:

<gallery caption="Sample gallery" widths="100px" heights="100px" perrow="6">
File:Drenthe-Position.png|[[w:Drenthe|Drenthe]], the least crowded province
File:Flevoland-Position.png
File:Friesland-Position.png|[[w:Friesland|Friesland]] has many lakes
File:Gelderland-Position.png
File:Groningen-Position.png
File:Limburg-Position.png
File:Noord_Brabant-Position.png
File:Noord_Holland-Position.png
File:Overijssel-Position.png
File:Utrecht-Position.png
File:Zuid_Holland-Position.png|[[w:South Holland|South Holland]], the most crowded province
File:Zeeland-Position.png
</gallery>

gives:

Galleries in categories

A gallery of images on a category page is automatically shown as the fourth section of this category page. The first 20 characters of the image name are shown, with dots if that is not the full name. Both the image and the name link to the image page, instead of just the image. No alternative text or other links are possible. The file size is also shown.

For a comparison, see commons:Category:William-Adolphe Bouguereau and commons:William-Adolphe Bouguereau.

Images in a table

Using table syntax, with images in separate cells, and the image syntax explained elsewhere on this page, gives more control over size, layout, captions, etc. than each of the two methods above. However, only a category page automatically gives file sizes.

Example of an image table:

{| border="1"
|+'''Provinces of the Netherlands'''
|-
| valign="top"|
[[File:Drenthe-Position.png|thumb|left|150px|[[w:Drenthe|Drenthe]], the least crowded province]]
| valign="bottom"|
[[File:Flevoland-Position.png|thumb|left|100px|]]
| valign="top"|
[[File:Friesland-Position.png|thumb|left|100px|]]
|-
|
|-
| valign="top"|
[[File:Gelderland-Position.png|thumb|left|100px|]]
| valign="top"|
[[File:Zuid_Holland-Position.png|thumb|left|100px|[[w:South Holland|South Holland]], the most crowded province]]
| valign="top"|
[[File:Utrecht-Position.png|thumb|left|50px|]]
|}

gives:

Provinces of the Netherlands
File:Drenthe-Position.png
Drenthe, the least crowded province

Note that, with this method, each image has a width specified by the size option, if any, and a height depending on whether there is caption or not, and how long the caption is. The width of a column is determined by the widest image in it, and the height of the row is determined by the tallest image in it.

template:gallery ( talk edit history links ) supports making a gallery using table syntax.

The parameters "left" and "right" may give complications inside a table (and may not be needed anyway), depending on the browser. In IE the first table sometimes (!) displays text through the image:

{| border="1"
| [[File:Crystal_Clear_app_clock.png|left]]
|abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
|}
abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz
{| border="1"
| [[File:Crystal_Clear_app_clock.png]]
|abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
|}
File:Crystal Clear app clock.png abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz

Linking

To link to an uploaded file, e.g. Flag of Somalia.svg, use [[Media:Flag of Somalia.svg]] instead of [[Image:Flag of Somalia.svg]], giving Media:Flag of Somalia.svg; to link to the image description page, use [[:Image:Flag of Somalia.svg]], giving Image:Flag of Somalia.svg (the first colon is not displayed). In the case of non-image uploads, e.g. office files (if allowed by the system), the keyword 'media' is used even though office documents are not typically classed as media, in the context of audio/video etc.

Piped links work as usual. Existence detection, with a link to the edit page if the page does not exist, works as usual, but is applicable for the image page, not the file.

Interwiki linking style gives a link to the image page. If interlanguage links would be applicable, use a colon in front of the language code, e,g. [[:de:Bild:Europa-Pos.png]], to avoid the link being put in the margin. For embedding (if possible, see below) and linking to the file itself, use external link style.

External link syntax is as usual. However, if you want a link to an image proper on a page of a project that allows embedded external images, use a bracketed link syntax and not just the URL, to prevent embedding.

Below one can see the result of the three types of internal link style and external link style on this project. To test this in another project, copy the wikitext there. If applicable, check also the interlanguage links at the margin of the page. Note that some links go to the image description page, others just to the image itself.

Navigational maps

Navigational maps like [4] have map areas linked to pages. The html with <area> tags can not be put in the wikitext. However, there are the following possibilities:

  • With ImageMap (MW 1.9+) you can define areas in an image and link to wiki pages when clicking on that area.
  • EasyTimeline allows the creation of an image and a page embedding that image, with rectangular map areas defined by <area> tags in the html. The title of a link to a non-internal page is only the domain name, e.g. "en.wikipedia.org/..". The length and width of the rectangle can not be controlled, except that it depends on the length of the link label and its font size. In case of overlap of rectangles one has to look at the hoverbox or statusbar to avoid following the wrong link. In case of much overlap it may not be possible to use all links.
  • One can divide an image in rectangles, like in these chess and go positions, or superimpose an area with images (see above) and link each rectangle/image to the desired target by means of a redirect on the image page (provided that the target is internal).

See also:

Example using ImageMap

Example:

<imagemap>
Image:Sudoku dot notation.png|300px
circle  320  315 165 [[w:1|1]]
circle  750  315 160 [[w:2|2]]
circle 1175  315 160 [[w:3|3]]
circle  320  750 160 [[w:4|4]]
circle  750  750 160 [[w:5|5]]
circle 1175  750 160 [[w:6|6]]
circle  320 1175 160 [[w:7|7]]
circle  750 1175 160 [[w:8|8]]
circle 1175 1175 160 [[w:9|9]]
default [[w:Number|Number]]
</imagemap>

Output of this example: <imagemap> Image:Sudoku dot notation.png|300px circle 320 315 165 1 circle 750 315 160 2 circle 1175 315 160 3 circle 320 750 160 4 circle 750 750 160 5 circle 1175 750 160 6 circle 320 1175 160 7 circle 750 1175 160 8 circle 1175 1175 160 9 default Number </imagemap>

See also:

Examples using EasyTimeline

Example 1

<timeline>
ImageSize  = width:400 height:150
PlotArea   = width:400 height:150 left:0 bottom:0
TimeAxis  = orientation:vertical # dummy, required
Period    = from:0 till:1 # dummy, required
Define $s = fontsize:XL
TextData  =
  pos:(50,120) $s text:[http://en.wikipedia.org/wiki/Leiden|o Leiden]
  pos:(150,110) $s text:[http://en.wikipedia.org/wiki/Alphen%20aan%20den%20Rijn|o Alphen aan den Rijn]
  pos:(10,80) $s text:[http://en.wikipedia.org/wiki/The%20Hague|o The Hague]
  pos:(50,40) $s text:[http://en.wikipedia.org/wiki/Rotterdam|o Rotterdam]
</timeline>

gives

<timeline> ImageSize = width:400 height:150 PlotArea = width:400 height:150 left:0 bottom:0 TimeAxis = orientation:vertical # dummy, required Period = from:0 till:1 # dummy, required Define $s = fontsize:XL TextData =

 pos:(50,120) $s text:Leiden
 pos:(150,110) $s text:Alphen aan den Rijn
 pos:(10,80) $s text:The Hague
 pos:(50,40) $s text:Rotterdam

</timeline>

Example 2

<timeline>
Preset     = TimeHorizontal_AutoPlaceBars_UnitYear
ImageSize = width:500 barincrement:50
Period     = from:0 till:12
BarData=
  bar:a
  bar:b
  bar:c
Define $s = fontsize:XL
BackgroundColors = canvas:white
PlotData=
  width:20
  shift:(45,-5)
  bar:a from:3 till:4 $s text:[http://en.wikipedia.org/wiki/Leiden|Leiden]
  bar:a  from:6 till:7 $s text:[http://en.wikipedia.org/wiki/Alphen%20aan%20den%20Rijn|Alphen aan den Rijn]
  bar:b  from:1 till:2 $s text:[http://en.wikipedia.org/wiki/The%20Hague|The Hague]
  bar:c  from:3 till:4 $s text:[http://en.wikipedia.org/wiki/Rotterdam|Rotterdam]
</timeline>

gives

<timeline> Preset = TimeHorizontal_AutoPlaceBars_UnitYear ImageSize = width:500 barincrement:50 Period = from:0 till:12 BarData=

 bar:a
 bar:b
 bar:c

Define $s = fontsize:XL BackgroundColors = canvas:white PlotData=

 width:20
 shift:(45,-5)
 bar:a from:3 till:4 $s text:[5]
 bar:a  from:6 till:7 $s text:aan den Rijn
 bar:b  from:1 till:2 $s text:Hague
 bar:c  from:3 till:4 $s text:[6]

</timeline>

Alternatives

Some attempts for other alternatives (note the hover boxes):

o
o
o

Ascii art map, with both the city outline and the label clickable:

    x
   xxx Leiden
    x

 xx
xxxx The Hague
xxx

        xx
       xxxxx Rotterdam
        xxxx

When external images can be embedded:

http://upload.wikimedia.org/wikipedia/commons/2/27/Tst.png
http://upload.wikimedia.org/wikipedia/commons/2/27/Tst.png
http://upload.wikimedia.org/wikipedia/commons/2/27/Tst.png

The HTML titles are "w: Leiden", etc., the alt attribute is "Tst.png". Opera shows the title in the hoverbox, and also the url, IE only shows the titles.

With labels:

http://upload.wikimedia.org/wikipedia/commons/2/27/Tst.png Leiden
http://upload.wikimedia.org/wikipedia/commons/2/27/Tst.png The Hague
http://upload.wikimedia.org/wikipedia/commons/2/27/Tst.png Rotterdam

See also m:Maps, m:Maps' clickability.

For using an image as a link to another document, see Help:Navigational image. For more possibilities, see en:Wikipedia:Extended image syntax. Also, the source of existing pages with images are useful as examples.

Template for showing links to files with appropriate icons

For a template to enable files to be shown as links with relevant icons, as well as a link to the file's wiki page, see here.

This is for wikis that support embedding external images - which is most personal, corporate and organizational wikis based on MediaWiki. Notable exceptions are Wikipedia and Meta. Because Meta can't render this template, here is an image of how the template appears: MetaWikiPedia:Image:PDF file example.png

See also

External links

Find all projects using a given Commons image


+/-

Links to other help pages

Help contents
Meta | Wikinews | Wikipedia | Wikiquote | Wiktionary | commons: | mw: | b: | s: | mw:Manual | google
Versions of this help page (for other languages see below)
Meta | Wikinews | Wikipediahttp://en.wikipedia.org/Help:Images_and_other_uploaded_files | Wikiquote | Wiktionary
What links here on Meta or from Meta | Wikipedia | MediaWiki
Reading
Go | Search | Stop words | URL | Namespace | Page name | Section
Backlinks | Link | Piped link | Interwiki link | Redirect | Category | Image page
Logging in and preferences
Logging in | Preferences | User style
Editing
Advanced editing | Editing FAQ | Edit toolbar | Export | Import | Shortcuts
Tracking changes
Recent changes (enhanced) | Related changes | Watching pages | Diff
Page history | Edit summary | User contributions | Minor edit | Patrolled edit
Style & formatting
Wikitext examples | Reference card | HTML in wikitext | List | Table | Sorting | Colors
Special input and output
Inputbox | Special characters | Displaying a formula | Images (uploads) | EasyTimeline
Advanced functioning
Template | Advanced templates | Parser function | ParserFunctions | Parameter default
Variable | Magic word | System message | Substitution | Array | Calculation
Page management
Starting a new page | Renaming (moving) a page | Protecting pages | Deleting a page
Special pages
Talk page | Testing | Sandbox | CentralNotice

Template:-

Personal tools
support the site