WikiQueer:Picture tutorial

This tutorial explains how to insert pictures into WikiQueer articles using wikitext. This is one of the most frequently asked questions. It describes options for specifying placement, alt text, captions, sizes and links, and contains advice about panoramas and avoiding image stackups. There is also a technical document describing the syntax. The same syntax is used regardless of whether a file is from WikiQueer or Wikimedia Commons.

If you need help uploading an image, or selecting a suitable image for an article, see the image use policy and the Manual of Style. Images on most web sites are copyrighted and should not be uploaded; see the copyright policy. Please upload the highest resolution image possible, but keep the file size under 100 megabytes.

Before you add an image to an article, view its image description page to make sure its copyright status is clearly stated, preferably with one of the image copyright tags.

Thumbnails
A typical picture can be inserted with a line " " as shown below. (" " can be substituted for " " with no change in effect; the choice between the two is purely a matter of editorial preference.) Using " " generates a thumbnail, a picture that is typically sized differently from the original image. Several options can affect a thumbnail's placement and size.

On the left
By default a thumbnail is floated to the right of the page, with the text flowing around it. However, the video tutorial on the right of this section might collide with a right-floating picture, so our first example specifies " ", and just below it you can see what the resulting picture looks like:



The above text gives the image file name "Wikipedesketch1.png", the image type "thumb" and alignment "left", the alt text "A cartoon centipede reads books and types on a laptop.", and the caption "The Wikipede edits Myriapoda." A WikiQueer reader can click on the thumbnail, or on the small double-rectangle icon below it, to see the corresponding file page which will let the user see the image in its original size.

Although the above text may appear in multiple lines for formatting purposes, the actual image text is on one line, as it uses spaces without any line breaks. The " " and the first " " must be on the same line; other spaces and line breaks are ignored if they are next to " " characters or just inside the brackets. Some parts of the image syntax, such as the " ", do not allow spaces or line breaks, and the easiest way to get it right is to omit unnecessary spaces and line breaks.

Alt text is intended for visually impaired readers. Often the caption or article will describe the image inadequately, and where this is the case you can write alt=caption or alt=see adjacent text. If additional alt text is added, it should be a succinct description that complies with the content policies; see WQ:ALT for more information. Unlike alt text, a caption can contain Wiki markup like " ". The caption text is placed underneath the picture.

Here is the same example again, this time in the context of some colored lorem ipsum dummy text with asterisks (*) showing where the image syntax appears in the text:



**

On the right
The default placement for a thumbnail is on the right:



**

Without flowing text
Although most thumbnails are combined with flowing text and are placed to the right or left, you can also place a thumbnail without text flowing around it. One way is to center it, using " ":



**

You can also place the picture to the left, without flowing text, using " ":



**

Thumbnail sizes
Normally a thumbnail has a width of 220 pixels (px). This width is used by typical readers, who have not logged in or who have not changed their preferences. You can set a different default width for yourself in My preferences under "Appearance:Files". The options are 120px, 150px, 180px, 200px, 220px, 250px, and 300px. Any image narrower than the preferred width is displayed at the narrower width.

Images beside the text should generally use a caption and the " " (thumbnail) option; the default results in a display 220 pixels wide (170 pixels if the " " option is used), except for those logged-in users who have set a different default in their user preferences. In general, do not define the size of an image unless there is a good reason to do so: some users have small screens or need to configure their systems to display large text; "forced" large thumbnails can leave little width for text, making reading difficult. In addition, forcing a "larger" image size at say 260px will actually make it smaller for those with a larger size set as preference.

Sometimes a picture may benefit from a size other than the default; see the Manual of Style for guidance.


 * Where size forcing is appropriate, larger images should generally be a maximum of 500 pixels tall and 400 pixels wide, so that they can comfortably be displayed on the smallest displays in common use. Since MediaWiki dynamically scales inline images there is no need to reduce file size via scaling or quality reduction when uploading images, although compressing PNGs may be useful.


 * Lead images should usually be no wider than "300px" ("upright=1.35").

The default behavior can make a tall, thin picture come out too large. For example:



**

The " " option can help fix this by informing the WikiQueer layout system that the image should have a narrower width than usual:
 * Upright images



**

The " " option normally creates an image that is about 75% of the width of the default. The exact width is computed by starting with the default thumbnail width, multiplying it by 0.75, and rounding to the nearest multiple of 10. Normally the default width is 220px so an upright image is 170px wide; changing one's default width within the range from 120px to 300px results in upright image widths ranging from 90px to 230px.

If the upright factor 0.75 is too large or too small, it can be specified explicitly. A factor of 1.0 uses the default thumbnail width, which is the same as not specifying " " at all; a factor less than or greater than 1.0 creates an image smaller or larger than the default. For example:
 * Shrinking upright images further



**

Short, wide images sometimes benefit from " " factors greater than 1.0. Factors greater than about 2.5 can generate large images that cause problems with some browsers; for one way to handle wider images, see Panoramas below. Although many image types, such as JPEG and PNG, do not handle enlargement well, SVG images have no problem with it. For example:
 * Short, wide images



**

You can also display an image of a specified width. Typically, if you specify a width in pixels, it should be at least 300px. Widths greater than about 550px may cause problems with some browsers, as stated above.
 * Width in pixels





To specify the exact height of a picture, letting the width scale to match, prefix the height with " ". The following example resizes the image to a height of 60px:
 * Height in pixels






 * Width or height in pixels, whichever makes the image smaller

If you specify both width and height of a picture, it is sized to whichever value would make it smaller. This will cause a picture to fit in a certain area, regardless of the image's actual size. Since the proportions of Image:Flag of Scotland.svg are 5×3, specifying a width of 120px generates a 120×72px image, and specifying a height of 60px generates a 100×60px image, so a size field of " " generates the smaller of the two, namely, the 100×60px image:






 * Pixel counts vs. upright factors

Although pixel counts are easier to understand than upright factors, they adjust less well to user preferences. For example, suppose a picture contains some detail and by default is a bit too small, and you want to grow it by about 10%. Although " " and " " do the job equally well for the common case where the default width is 220 pixels, many of the users who set the default width to 300 pixels to work better with their high-resolution screens will be annoyed with " " because it will make the picture a third smaller than their preferred size. In contrast, " " will display the picture to them with a width of 330 pixels, and this is more likely to work well on their displays.

Pixel counts are typically better than upright factors for displaying combinations of pictures, some of which have known and limited sizes, and for displaying tiny icons that are intended to be combined with text.

Replacing " " with " " causes the image to be displayed in its native size, that is, the size that it was originally uploaded with. This usage is mostly obsolescent as it does not allow resizing, but you may see it in older articles. For example:
 * Native size





Panoramas
Very large pictures should not be put directly into articles, as they cause problems in some browser environments. Images wider than 550px or so are often better treated as a panorama, which can be created with the Wide image template. For example:



DjVu and PDF files
Images can be excerpted from DjVu or PDF files, with an optional page parameter. For example:



Avoiding stack-ups
One of the problems many users of floating pictures hit is that multiple pictures sometimes stack up vertically, particularly with large screens and wide images. For example, in many browsers the two pictures at the right of this text stack up awkwardly.



Often the best solution to this is simply to add more text, as is done below, but this sometimes is not possible. The following subsections show some other possible solutions to the problem.



Alternating left and right
Perhaps the easiest way is to handle multiple floating pictures is to alternate them left then right; this way they do not come into contact with one another, and so cannot stack up in an unattractive way. This has a disadvantage, though: people with very low screen resolutions (such as those using smartphones, tablets or netbooks) may find the result too awkward, albeit still readable.



Co-aligning
It is common to have two pictures that logically should be grouped together. The multiple image template is one way to do this. For example:



The same template can also align pictures vertically:



Galleries
A gallery displays several pictures in an array or similar layout. Before making a gallery, read the image use policy for galleries. Perhaps the most flexible method is table syntax. For example:



There are lots of other ways to make a gallery, including templates such as Gallery and Image gallery. One simple way is the gallery tag; unfortunately, this does not support alt text, so it generates pages that are not accessible to visually impaired and other readers who cannot see the images. More information about the gallery tag can be found in Gallery and in Gallery of images help.

Forcing a break
As a final resort, you can force the browser to insert a break, making all text and pictures appear below the bottom of the first picture. 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. Do not force page design just so that it looks pretty on your display. Hack only where absolutely necessary. Wherever possible, just use the simplest logical page flow.





Plain pictures
Most pictures in articles are thumbnails, but sometimes more specialized needs require finer grained control. A plain picture with no formatting can be inserted with:



In this plain picture the text " " is not visible as a caption. Instead, it appears as the title text of the image, commonly displayed as a tooltip during a mouseover. In a thumbnail the alt text defaults to empty, but a plain picture's alt text defaults to its title text if given and to the picture's file name if not; this default can be overridden with an explicit " " option. Title text, like alt text, will ignore any Wiki markup.

A plain picture can be placed anywhere in the article, and acts as a big character in the text, so that nearby text does not float or wrap around it. For example:

**


 * Note: To achieve a plain image with a caption, one can use Plain image with caption. The caption is automatically added as the image's title and alt text, and any wiki markup used on it will be correctly displayed on the caption, but will be automatically stripped down from the alt and title text.

Plain picture sizes
A plain picture defaults to the image's native size. This can be overridden with an explicit size. For example:



**

The " " option causes a plain picture to default to the same size as a thumbnail. As with thumbnails, the default can be adjusted with the " " option. If you use the common default of 220 pixels for thumnail widths, the following example image's width will be 220 × 0.2 pixels, which rounds to 40 pixels:



**

Border
The " " option adds a one-pixel border, which can be useful when it is important to distinguish image from background. Here is the same picture with and without a border.



This generates "Flag of Japan.svg Flag of Japan.svg".

Horizontal placement
Like thumbnails, plain pictures can be floated left or right with text flowing around them; or centered or put left without text flow. The only difference is that the " " parameter is required to float a plain picture to the right, whereas floating right is the default for thumbnails. For example:



**

Vertical alignment
When a plain picture appears in text, it is aligned so that its vertical middle is roughly where the center of a lower-case "x" would be; if the image is larger than the line is tall, it sticks out both above and below. The vertical alignment syntax provides several options to adjust this. For example, the " " option:



generates "XFlag of Hungary vertical.svg" instead of the default "XFlag of Hungary vertical.svg". Available options for vertical alignment, next to the output that they generate, are , (the default), ,, , , , and .

Links

 * You may be looking for inline linking to external images. This is not allowed; see the WikiQueer policy on inline linking.

Normally a picture links to its image page, which describes the image, who created it, and links to the original image at full resolution. You can create a plain picture that links to some other location by using the " " option.

To link to some other page, specify its name in the link option along with an appropriate caption that hints to readers what will happen if they click on the link. This caption serves both as title text for the tooltip, and as alt text for visually disabled readers. For example, " " generates a flag that links to the article France.

To link to an external site, specify its URL in the link option along with an appropriate caption. For example, " " generates a flag that links to the English-language portal of the Belgian government.

A purely decorative image, which conveys no information and does nothing when it is clicked on, can be specified with an empty alt attribute. For example " " generates a flag that is purely decorative.

Image maps
You can link different parts of an image to different locations using an image map. For example, in the image at right, clicking a circle roughly corresponding to the left portrait takes the reader to William Jennings Bryan, clicking the right portrait goes to Arthur Sewall, and clicking anywhere else goes to. This image is generated by the following markup:



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 image map documentation, 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 " " or " ", 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 also an Image map editor at the toolserver.

Overlaying annotations on an image
Some diagrams are uploaded without text, so that they can be used in multiple languages; or one may desire to add clickable links to an image. In such cases, text annotations can be added to an image with the template Template:Annotated image.

Linking without displaying
Let us say you want to link to the picture without displaying it. You can take them to the image page, where it tells them who uploaded it, when, what the copyright status is, etc.:


 * Image:Wikipedesketch1.png
 * Image:Wikipedesketch1.png

You can make the link say anything you want.


 * A cartoon centipede reads books and types on a laptop.
 * A cartoon centipede reads books and types on a laptop.

When the link is clicked the image is displayed with other text information at a reasonable size. The user can click through the resulting medium-sized image to get to the full size highest resolution image.

You can also send the user directly to the image:


 * [[Media:Wikipedesketch1.png]]
 * [[Media:Wikipedesketch1.png]]

This says " " instead of " ". When the user clicks on the link, the browser goes directly to the image. As before, you can change the text so it says anything you want.


 * [[Media:Wikipedesketch1.png|A cartoon centipede reads books and types on a laptop.]]
 * [[Media:Wikipedesketch1.png|A cartoon centipede reads books and types on a laptop.]]

This can be awkward if the image is quite large, for the full size image will be displayed when the user clicks the link.

Finally, you can link to one image from a thumbnail's small double-rectangle icon, but display another image using "Displayed image name". This is intended for the rare cases when the WikiQueer software that reduces images to thumbnails does a poor job, and you want to provide your own thumbnail. In the following example, the double-rectangle links to File:Anime stub 2.svg but the image displayed is File:Anime stub.png:



In case an image will not render
If the image will not render, and instead the wikicode is shown in the article, it may have the following causes:
 * The image syntax is incomplete or incorrect.
 * The caption may have incomplete link tags, especially unpaired  s  and  s  that become interpreted as image syntax
 * The previous image may have incorrect image syntax, especially an incomplete  ]]  at the end

Tips

 * When placing or sizing images, it is often better to edit the entire page, rather than just one section, to avoid unexpected overlaps with other sections of the article.


 * Before publishing any images, keep in mind that they can contain hidden data. This data can include comments that are not displayed, Exif metadata, and messages hidden via steganography.