User:CatherineMunro/Image

From Wikipedia, the free encyclopedia

Image:Cathmunro.jpg
Photo by Catherine Munro


This is a short tutorial on uploading and inserting images to Wikipedia, with pointers to longer articles with more detail.

Contents

[edit] Choose the image

  1. The images that are simplest and most welcome here are pictures you have taken yourself, that you are willing to license under the GNU Free Documentation License. This allows anyone to copy and reuse your picture for any purpose (including commercially), so long as you are credited, and they don't try to claim copyright for themselves.
  2. If you did not take the image yourself, you must be certain that it is usable by our project -- under a free license, in the public domain, or (in some limited cases) fair use. Most images copied from the web are NOT suitable for Wikipedia use. Read the Wikipedia:Image use policy for more information.
  3. If you do get the image from a legitimately usable source on the web, be sure you have recorded that source information or have it available; you'll need it shortly.

[edit] Prepare the image

  1. If you know how to use image editing tools, use them to make the picture as attractive as possible: if necessary, crop, sharpen, optimize colors and size, etc. (If not, don't worry about this step; if the picture needs it, someone else can and will clean it up.)
  2. Give the image file on your computer's hard drive a complete, descriptive name, and save it in a place where you can easily find it later (such as your desktop, My Documents, or My Pictures).

[edit] Upload the image

If the picture is free (you took it yourself, it is under a free license, or is public domain), we prefer that you upload the picture to Wikimedia Commons, a central repository of free images that will make your picture available to all Wikimedia projects, including Wikipediae in other languages, Wiktionary, Wikibooks, and more. You will need to register a quick free account there as well, and follow [steps]. Finish reading the instructions here and those steps will make more sense to you.

  1. Go to the Special:Upload page -- this is reachable from the "Upload file" link in the "toolbox" in your left-hand sidebar (it might be elsewhere on the page if you have switched to a non-default skin).
  2. Click the "Browse" or "Choose" button and find the file on your hard drive.
  3. Enter a concise description in the Summary field.

This is a tutorial on how to insert pictures in Wikipedia articles using Wikiformat. There is also a shorter technical document describing the syntax.

Style and formatting
Manual of Style and its subpages
Related policies and guidelines
Related help, tutorials and proposals
Related to specific cultures

If you need help uploading an image, or selecting a suitable image for an article, you should also read our image use policy.

Note that before you add an image to an article, you should edit the image description page to explain the source of the image and make sure the copyright status of the image is clearly stated. It is preferred that you use one of the Wikipedia:Image copyright tags, as appropriate.

For the purposes of this article, all examples will be done using Stevertigo's Wikipedia logo.

[edit] Plain picture

A plain picture with no formatting can be inserted with the statement:
[[Image:Wikipedesketch1.png]]
The picture is the same size as the user originally uploaded. The placement in the article is arbitrary, and text does not float (wrap around) it. For example:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis tellus. Donec ante dolor, iaculis nec, gravida ac, cursus in, eros. Mauris vestibulum, felis et egestas ullamcorper, purus nibh vehicula sem, eu egestas ante nisl non justo. Fusce tincidunt, lorem nec dapibus consectetuer, leo orci mollis ipsum, eget suscipit eros purus in ante. Image:Wikipedesketch1.png Mauris at ipsum vitae est lacinia tincidunt. Maecenas elit orci, gravida ut, molestie non, venenatis vel, lorem. Sed lacinia. Suspendisse potenti. Sed ultricies cursus lectus. In id magna sit amet nibh suscipit euismod. Integer enim. Donec sapien ante, accumsan ut, sodales commodo, auctor quis, lacus. Maecenas a elit lacinia urna posuere sodales. Curabitur pede pede, molestie id, blandit vitae, varius ac, purus.

Notice how the picture cut the text into two pieces, depending on where I put the tag.

[edit] Specifying placement

Now, let's say we want either (a) text to float (wrap around) the picture, or (b) to specify where it gets put (left, right, inline, etc). To to this, we simply append the placement statement.

[edit] Example 1 - Right align, float

[[Image:Wikipedesketch1.png|right]]

Mauris at ipsum vitae est lacinia tincidunt. Maecenas elit orci, gravida ut, molestie non, venenatis vel, lorem. Sed lacinia. Suspendisse potenti. Sed ultricies cursus lectus. In id magna sit amet nibh suscipit euismod. Integer enim. Donec sapien ante, accumsan ut, sodales commodo, auctor quis, lacus. Maecenas a elit lacinia urna posuere sodales. Curabitur pede pede, molestie id, blandit vitae, varius ac, purus.

Morbi dictum. Vestibulum adipiscing pulvinar quam. In aliquam rhoncus sem. In mi erat, sodales eget, pretium interdum, malesuada ac, augue. Aliquam sollicitudin, massa ut vestibulum posuere, massa arcu elementum purus, eget vehicula lorem metus vel libero. Sed in dui id lectus commodo elementum. Etiam rhoncus tortor. Proin a lorem. Ut nec velit. Quisque varius. Proin nonummy justo dictum sapien tincidunt iaculis. Duis lobortis pellentesque risus. Aenean ut tortor imperdiet dolor scelerisque bibendum. Fusce metus nibh, adipiscing id, ullamcorper at, consequat a, nulla.

Phasellus orci. Etiam tempor elit auctor magna. Nullam nibh velit, vestibulum ut, eleifend non, pulvinar eget, enim. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Integer velit mauris, convallis a, congue sed, placerat id, odio. Etiam venenatis tortor sed lectus. Nulla non orci. In egestas porttitor quam. Duis nec diam eget nibh mattis tempus. Curabitur accumsan pede id odio. Nunc vitae libero. Aenean condimentum diam et turpis. Vestibulum non risus. Ut consectetuer gravida elit. Aenean est nunc, varius sed, aliquam eu, feugiat sit amet, metus. Sed venenatis odio id eros.

Phasellus placerat purus vel mi. In hac habitasse platea dictumst. Donec aliquam porta odio. Ut facilisis. Donec ornare ipsum ut massa. In tellus tellus, imperdiet ac, accumsan at, aliquam vitae, velit.


[edit] Example 2 - Right align, float, with caption

You'll usually put these at the start of a paragraph so the image floats to the right of the paragraph - it's common to see these at the start of an article.

[[Image:Wikipedesketch1.png|frame|right|Here is a boring caption]]
Here is a boring caption
Here is a boring caption

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis tellus. Donec ante dolor, iaculis nec, gravida ac, cursus in, eros. Mauris vestibulum, felis et egestas ullamcorper, purus nibh vehicula sem, eu egestas ante nisl non justo. Fusce tincidunt, lorem nec dapibus consectetuer, leo orci mollis ipsum, eget suscipit eros purus in ante. Mauris at ipsum vitae est lacinia tincidunt. Maecenas elit orci, gravida ut, molestie non, venenatis vel, lorem. Sed lacinia. Suspendisse potenti. Sed ultricies cursus lectus. In id magna sit amet nibh suscipit euismod. Integer enim. Donec sapien ante, accumsan ut, sodales commodo, auctor quis, lacus. Maecenas a elit lacinia urna posuere sodales. Curabitur pede pede, molestie id, blandit vitae, varius ac, purus.

Morbi dictum. Vestibulum adipiscing pulvinar quam. In aliquam rhoncus sem. In mi erat, sodales eget, pretium interdum, malesuada ac, augue. Aliquam sollicitudin, massa ut vestibulum posuere, massa arcu elementum purus, eget vehicula lorem metus vel libero. Sed in dui id lectus commodo elementum. Etiam rhoncus tortor. Proin a lorem. Ut nec velit. Quisque varius. Proin nonummy justo dictum sapien tincidunt iaculis. Duis lobortis pellentesque risus. Aenean ut tortor imperdiet dolor scelerisque bibendum. Fusce metus nibh, adipiscing id, ullamcorper at, consequat a, nulla.

[edit] Example 3 - Left align, float

[[Image:Wikipedesketch1.png|left]] 

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis tellus. Donec ante dolor, iaculis nec, gravida ac, cursus in, eros. Mauris vestibulum, felis et egestas ullamcorper, purus nibh vehicula sem, eu egestas ante nisl non justo. Fusce tincidunt, lorem nec dapibus consectetuer, leo orci mollis ipsum, eget suscipit eros purus in ante.

Mauris at ipsum vitae est lacinia tincidunt. Maecenas elit orci, gravida ut, molestie non, venenatis vel, lorem. Sed lacinia. Suspendisse potenti. Sed ultricies cursus lectus. In id magna sit amet nibh suscipit euismod. Integer enim. Donec sapien ante, accumsan ut, sodales commodo, auctor quis, lacus. Maecenas a elit lacinia urna posuere sodales. Curabitur pede pede, molestie id, blandit vitae, varius ac, purus. Morbi dictum. Vestibulum adipiscing pulvinar quam. In aliquam rhoncus sem. In mi erat, sodales eget, pretium interdum, malesuada ac, augue. Aliquam sollicitudin, massa ut vestibulum posuere, massa arcu elementum purus, eget vehicula lorem metus vel libero. Sed in dui id lectus commodo elementum. Etiam rhoncus tortor. Proin a lorem. Ut nec velit. Quisque varius. Proin nonummy justo dictum sapien tincidunt iaculis. Duis lobortis pellentesque risus. Aenean ut tortor imperdiet dolor scelerisque bibendum. Fusce metus nibh, adipiscing id, ullamcorper at, consequat a, nulla.

Phasellus orci. Etiam tempor elit auctor magna. Nullam nibh velit, vestibulum ut, eleifend non, pulvinar eget, enim. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Integer velit mauris, convallis a, congue sed, placerat id, odio. Etiam venenatis tortor sed lectus. Nulla non orci. In egestas porttitor quam. Duis nec diam eget nibh mattis tempus. Curabitur accumsan pede id odio. Nunc vitae libero. Aenean condimentum diam et turpis. Vestibulum non risus.


[edit] Example 4 - Don't float

[[Image:Wikipedesketch1.png|none]]

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis tellus. Donec ante dolor, iaculis nec, gravida ac, cursus in, eros. Mauris vestibulum, felis et egestas ullamcorper, purus nibh vehicula sem, eu egestas ante nisl non justo. Fusce tincidunt, lorem nec dapibus consectetuer, leo orci mollis ipsum, eget suscipit eros purus in ante. Mauris at ipsum vitae est lacinia tincidunt.

Sed lacinia. Suspendisse potenti. Sed ultricies cursus lectus. In id magna sit amet nibh suscipit euismod. Integer enim. Donec sapien ante, accumsan ut, sodales commodo, auctor quis, lacus. Maecenas a elit lacinia urna posuere sodales. Curabitur pede pede, molestie id, blandit vitae, varius ac, purus.

[edit] Framing, adding a caption

It's usual to include a caption to describe the image and give credit as necessary. This means that the image will need a "frame"

[[Image:Wikipedesketch1.png|frame|This picture was Stevertigo's entry in the Wikipedia mascot contest]]

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla risus massa, luctus sed, sagittis ac, dapibus eu, pede. Suspendisse convallis ligula ac lorem. Quisque luctus. Mauris ut purus a libero semper sollicitudin. Integer dapibus, velit sit amet rhoncus aliquam, pede ligula cursus ante, nec elementum erat dui et mauris. Nulla quam dolor, nonummy vel, varius fermentum, suscipit ut, sapien. Pellentesque suscipit felis ac nibh. Nunc luctus hendrerit eros. Phasellus lacus. Donec non leo in sem consequat pulvinar. Curabitur ut magna vitae lectus tristique ultrices. Phasellus venenatis neque vulputate leo. Mauris quis eros.

This picture was Stevertigo's entry in the Wikipedia mascot contest
This picture was Stevertigo's entry in the Wikipedia mascot contest

Vestibulum nonummy. Nulla facilisis sapien dignissim risus. Quisque arcu urna, aliquam ac, facilisis ac, egestas non, est. Quisque neque. Donec et mi. Phasellus consequat. Integer pellentesque consectetuer lectus. Etiam malesuada eros id nibh. Fusce in tellus vitae mi auctor tincidunt. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae metus.

Etiam varius tempus odio. Cras bibendum arcu nec dolor. Donec consectetuer. Cras nonummy orci eget felis. Nullam sagittis venenatis libero. Duis neque purus, suscipit volutpat, molestie ut, venenatis ut, mi. Morbi nec eros. Praesent sollicitudin, nisl eget vehicula varius, tortor magna eleifend massa, ac iaculis turpis lacus quis nisl. Cras ut diam. Nullam erat ante, dignissim ac, posuere nec, commodo nec, nisl. Aenean adipiscing sodales augue. Donec rutrum. Ut nisl. Duis nisl. Ut elit. Vivamus suscipit rutrum tortor. Sed id pede. Praesent eros nulla, tempor vel, faucibus sed, mattis at, lectus. Sed euismod. Curabitur et leo vitae purus accumsan posuere.

Donec tempor nulla in turpis. Nam rutrum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam vel turpis vel risus fermentum posuere. In porta augue quis dui. Integer risus justo, venenatis ut, dapibus in, tempor sed, risus. In tincidunt rhoncus urna. Mauris placerat, tortor et malesuada congue, velit urna elementum urna, vel ornare est tellus vel nunc. Ut et risus. Integer in lorem. Ut in lectus ac arcu pretium rutrum. Phasellus imperdiet pede ut arcu. Sed ac massa. Donec id leo. Etiam ante odio, nonummy ac, elementum sit amet, suscipit eget, dolor. Nam id felis in quam ullamcorper sodales.


[edit] Resizing

Let's say that picture is too big. Let's say we want the user to get a smaller version (a "thumbnail") when he/she looks at the article. Thumbnails always include a frame, so when thumbnailing, you almost always want to specify a caption.

Wikiformat supports auto-resizing; that is, our contributors upload a picture of one size, and that picture gets automatically resized when a viewer looks at an article. For example, let's say we want it to be 100 pixels wide:

[[Image:Wikipedesketch1.png|100px]]

In typical graphical browsers, this image shows '100px' as a hint when the user moves the mouse over the image; in text browsers, '100px' will appear instead of the image. We should be able to improve on this by specifying alternative text, as follows:

[[Image:Wikipedesketch1.png|100px|Proposed Wikipedia mascotte]]

Proposed Wikipedia mascotte

Let's say we want it 500 pixels wide:

[[Image:Wikipedesketch1.png|500px|Proposed Wikipedia mascotte]]

Proposed Wikipedia mascotte

As you can see, the image is not scaled to 500 pixels. The wiki software limits the size of unframed images to that of the original. In other words, you can't enlarge pictures unless they are in a frame, which is what we will get to next.

[edit] Thumbnailing

A thumbnail frames a picture. It puts a gray border around a picture. This is a good way of letting a user know that a bigger version is available. It also lets you put a caption on the picture. (See Wikipedia:Captions for caption writing tips.)

[[Image:Wikipedesketch1.png|thumb|The Wikipedia logo]]

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla risus massa, luctus sed, sagittis ac, dapibus eu, pede. Suspendisse convallis ligula ac lorem. Quisque luctus. Mauris ut purus a libero semper sollicitudin. Integer dapibus, velit sit amet rhoncus aliquam, pede ligula cursus ante, nec elementum erat dui et mauris. Nulla quam dolor, nonummy vel, varius fermentum, suscipit ut, sapien. Pellentesque suscipit felis ac nibh. Nunc luctus hendrerit eros. Phasellus lacus. Donec non leo in sem consequat pulvinar. Curabitur ut magna vitae lectus tristique ultrices. Phasellus venenatis neque vulputate leo. Mauris quis eros.

The Wikipedia logo
The Wikipedia logo

Vestibulum nonummy. Nulla facilisis sapien dignissim risus. Quisque arcu urna, aliquam ac, facilisis ac, egestas non, est. Quisque neque. Donec et mi. Phasellus consequat. Integer pellentesque consectetuer lectus. Etiam malesuada eros id nibh. Fusce in tellus vitae mi auctor tincidunt. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae metus.

[edit] Combining different options

Ok, all this so far as has been cool, but it's not really useful unless you combine it all. Let's say we have a picture that we want floating, right aligned, thumbnailed, resized to 100 pixels, and with a caption. You can combine all of the above. Order does not matter, except that the picture name must come first and the caption must come last:

[[Image:Wikipedesketch1.png|thumb|100px|right|The Wikipedia logo]]

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis dapibus dictum purus. Cras nibh. Vivamus ante nunc, ultricies ut, fermentum at, luctus ac, felis. Suspendisse ac diam. Suspendisse lacinia congue mauris.

The Wikipedia logo
The Wikipedia logo

Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla facilisi. Donec varius egestas tortor. Curabitur augue leo, ullamcorper ac, tempus sed, gravida quis, felis. Curabitur pretium malesuada dui. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Curabitur et urna. Cras lacus. Donec risus. Proin ornare eros ac nibh. In venenatis erat sit amet mauris. Morbi sem felis, tempus eget, aliquam id, imperdiet id, elit. Vestibulum turpis. Etiam ornare, nisl ac varius fermentum, tortor elit laoreet tellus, ut interdum massa eros eget urna. Nunc congue nisl quis orci. Nunc nibh. Integer iaculis, ante sed fringilla tempus, enim augue gravida nibh, vehicula congue arcu tortor ac ligula. In eget libero vel magna varius viverra. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse elementum.

Mauris arcu magna, ultrices a, tristique facilisis, facilisis id, massa. Quisque in arcu. Praesent auctor mauris sit amet leo. Proin facilisis viverra tellus. Morbi at purus. Nam dictum. Donec ac neque. Integer sapien wisi, lacinia nec, tincidunt in, lacinia sit amet, ante. Quisque in urna. Donec rutrum.


[edit] Avoiding image "stackups"

One of the problems many users of floating images hit is that multiple images sometimes "stack up" horizontally, particularly with large screens and wide images. The best solution to this is simply to add more text, but this sometimes isn't possible. This section shows some solutions to this problem.

The Wikipedia logo
The Wikipedia logo

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec in enim. Aliquam erat volutpat. Maecenas id nibh ut turpis lobortis commodo. Phasellus sed neque. Proin fringilla euismod libero. Etiam vel lectus. Aliquam dui. Curabitur venenatis molestie neque. Integer mi dolor, gravida at, accumsan eget, fringilla eget, arcu. Suspendisse euismod. Nam et lorem accumsan magna venenatis pellentesque. In et ante. Etiam magna. Cras rutrum mi quis tellus. Nunc tristique risus pulvinar ante. Vivamus varius.

The flag of Scotland
The flag of Scotland


[edit] Co-aligning like images

It's very common to have two very similar images that logically should be grouped together. To achieve this, it's currently necessary to use some html markup:

  <div style="float:right;width:315px;">
  [[image:Wikipedesketch1.png|none|thumb|300px|Wikipedia logo]]

  [[image:Flag of Scotland.svg|none|thumb|200px|The flag of Scotland]]
  </div>
Wikipedia logo
Wikipedia logo


The flag of Scotland
The flag of Scotland

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed tellus neque, bibendum ac, accumsan eget, vestibulum a, nibh. Sed viverra urna non massa. Etiam vehicula ligula vitae nibh. Phasellus tempus auctor wisi. In consequat. Cras vel neque. Donec leo dolor, lobortis luctus, volutpat vitae, vestibulum in, eros. Maecenas porttitor, erat ullamcorper tempus faucibus, odio arcu venenatis nisl, ut cursus odio felis sed urna. Nullam ut elit vel est eleifend egestas. Ut dictum orci eu mi. Cras ultricies. Nulla facilisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos.

Nam turpis. Nunc in enim non turpis facilisis commodo. Suspendisse potenti. Maecenas elementum auctor odio. Vivamus vitae ante. Phasellus quis tortor et quam auctor convallis. Proin elit velit, nonummy a, semper hendrerit, dignissim quis, erat. Maecenas eleifend enim eu tortor. Curabitur non odio. Maecenas neque erat, venenatis sed, sollicitudin ut, iaculis non, mi. Praesent tempor, risus eget pellentesque tincidunt, dolor nibh imperdiet nulla, nec mattis leo ligula vel pede. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;

Integer nec libero. Nulla facilisi. Vivamus quis purus. Ut sem justo, lobortis at, luctus nec, aliquam nec, orci. Aenean nonummy. In metus. Sed malesuada vestibulum purus. Phasellus at odio. Integer in massa vitae quam euismod viverra. Integer nulla orci, ornare non, consequat non, mollis ornare, nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam id sapien ut sapien fermentum pretium. Cras mattis. Nam rhoncus. Maecenas dolor neque, tempor vel, iaculis nec, posuere vel, leo. Sed quis dolor. Vivamus mattis tellus elementum magna semper ullamcorper.


It is also often useful to horizontally align two images:

Wikipedia logo
Wikipedia logo
Wikipedia logo
Wikipedia logo

However, this should be used sparingly, as it can cause the images to protrude off the right of the page for people with narrow browser windows.

This is done using table markup:

{|
|-
| [[image:Wikipedesketch1.png|none|thumb|300px|Wikipedia logo]] ||[[image:Wikipedesketch1.png|none|thumb|300px|Wikipedia logo]] 
|}

An alternative, that avoids being too wide, is to align both left and rely on them to stack up:

Wikipedia logo
Wikipedia logo
Wikipedia logo
Wikipedia logo


[[image:Wikipedesketch1.png|left|thumb|300px|Wikipedia logo]]
[[image:Wikipedesketch1.png|left|thumb|300px|Wikipedia logo]] 
<br style="clear:both;">
It will be necessary to include the
<br style="clear:both;">
in order to prevent following text from being placed alongside the images.

[edit] Alternating left and right floats

Perhaps the easiest way is to make floating images alternate left then right - this way they don't come into contact with one another, and so can't stack up in an unattractive way.

The Wikipedia logo
The Wikipedia logo
The flag of Scotland
The flag of Scotland

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec in enim. Aliquam erat volutpat. Maecenas id nibh ut turpis lobortis commodo. Phasellus sed neque. Proin fringilla euismod libero. Etiam vel lectus. Aliquam dui. Curabitur venenatis molestie neque. Integer mi dolor, gravida at, accumsan eget, fringilla eget, arcu. Suspendisse euismod. Nam et lorem accumsan magna venenatis pellentesque. In et ante. Etiam magna. Cras rutrum mi quis tellus. Nunc tristique risus pulvinar ante. Vivamus varius.

Sed mi eros, lacinia mattis, gravida vel, placerat posuere, lacus. Duis accumsan tincidunt sapien. Morbi sed velit. Etiam quis orci. Donec at velit sed lorem elementum feugiat. Curabitur ut ligula. Quisque in eros. Morbi sed enim id sapien tristique fringilla. Nunc ligula augue, pellentesque ac, nonummy id, semper eget, ante.

[edit] Forcing a break

As a final resort, you can force the browser to insert a break, making all text and images appear below the bottom of the first image. This can produce rather unattractive gaps, particularly in the accompanying text. Remember that text will flow and wrap differently for other users, based on their chosen browser, screen resolution, default font size, accessibility options, number of toolbars and sidebars (such as instant messaging panes) and more -- don't force page design just so that it looks pretty on your machine. Hack only where absolutely necessary. Wherever possible, just use the simplest logical page flow.

   <br style="clear:both;">
The Wikipedia logo
The Wikipedia logo

All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy.


The flag of Scotland
The flag of Scotland

Tension, apprehension, and dissention have begun. Tension, apprehension, and dissention have begun. Tension, apprehension, and dissention have begun. Tension, apprehension, and dissention have begun. Tension, apprehension, and dissention have begun. Tension, apprehension, and dissention have begun. Tension, apprehension, and dissention have begun.


[edit] Photo gallery

[edit] Wiki markup and CSS

To display a series of photos in a gallery, there is a simple method using wiki markup and Cascading Style Sheets: Float all images in the gallery to the left, and clear their left float at the end to avoid having the images run into following content.


[[Image:Wikipedesketch1.png|128px|thumb|left|The Wikipedia logo 1]]
[[Image:Wikipedesketch1.png|128px|thumb|left|The Wikipedia logo 2]]
[[Image:Wikipedesketch1.png|128px|thumb|left|The Wikipedia logo 3]]
[[Image:Wikipedesketch1.png|128px|thumb|left|The Wikipedia logo 4]]
[[Image:Wikipedesketch1.png|128px|thumb|left|The Wikipedia logo 5]]
[[Image:Wikipedesketch1.png|128px|thumb|left|The Wikipedia logo 6]]
<br style="clear: left"/>

Advantages: Adapts to screen width by wrapping, simple markup.

The Wikipedia logo 1
The Wikipedia logo 1
The Wikipedia logo 2
The Wikipedia logo 2
The Wikipedia logo 3
The Wikipedia logo 3
The Wikipedia logo 4
The Wikipedia logo 4
The Wikipedia logo 5
The Wikipedia logo 5
The Wikipedia logo 6
The Wikipedia logo 6


[edit] New MediaWiki <gallery> tag

The new MediaWiki software has support for a <gallery> tag, which vastly simplifies making image galleries in pages:


<gallery>
Image:Wikipedesketch1.png|The Wikipedia logo
Image:Wikipedesketch1.png|A Wikipedia logo
Image:Wikipedesketch1.png|Wikipedia logo
Image:Wikipedesketch1.png|Wikipedia's logo
Image:Wikipedesketch1.png|A logo for Wikipedia
Image:Wikipedesketch1.png|One logo for Wikipedia
Image:Wikipedesketch1.png|Wikipedia has logo
Image:Wikipedesketch1.png|The logo of Wikipedia
</gallery>

Advantages: Really simple markup. Probably will get more support as MediaWiki matures (hopefully?), no wasted space between images

Disadvantages: Does not adapt to screen width by wrapping, can't specify image size (hopefully both will be fixed in the next version).

[edit] Templates

Another method which may become possible in the future makes use of the {{gallery}} template. Its syntax is:

{{gallery|filename|description}}
{{gallery end}}

The following alternative syntax allows image widths to be specified (as ###px). This may be merged with {{gallery}} if conditional parameters are implemented.

{{gallerypx|filename|description|width}}
{{gallery end}}

Advantages: Adapts to screen width with wrapping, simpler markup, no HTML, no visible CSS.

Disadvantages: Puts scroll bars and other nasties in some browsers. Can't specify image size.

The Wikipedia logo
The Wikipedia logo
The Wikipedia logo
The Wikipedia logo
The Wikipedia logo
The Wikipedia logo
The Wikipedia logo
The Wikipedia logo
The Wikipedia logo
The Wikipedia logo
The Wikipedia logo
The Wikipedia logo
The Wikipedia logo
The Wikipedia logo
The Wikipedia logo
The Wikipedia logo


[edit] Linking to pictures without displaying them

Let's say you want to link to the picture without displaying it. There are two ways to do it.

[[Media:Wikipedesketch1.png]]

Media:Wikipedesketch1.png

Notice that it says "media" instead of "image". When the user clicks on the link, the browser goes directly to the image. Also, notice that you can change the text so it says anything you want.

[[Media:Wikipedesketch1.png|This is the wikipedia logo]]

This is the wikipedia logo

Now let's say that instead of taking the viewer directly to the picture, you want to take them to the image page (where it tells them who uploaded it, when, what the copyright status is, etc). You can do that with:

[[:Image:Wikipedesketch1.png]]

Image:Wikipedesketch1.png

The only difference between this picture and the very first picture in this tutorial is that I put a colon before "image".

As above, I can make the link say anything I want.

[[:Image:Wikipedesketch1.png|This links directly to the logo's image page]]

This links directly to the logo's image page

[edit] See also

Languages