Help:Adding images

From wiki.gis.com
Jump to: navigation, search

Types of Images that can be Uploaded to wiki.GIS.com

  • Any image(s) that you have created.
  • Any image that has already been licensed under the Creative Commons license.
  • Any images that are public domain.
  • If you question whether or not the image can be used, use the discussion page to ask a moderator or an administrator if the image is usable.

Upload an Image to wiki.GIS.com

Important: Images must be uploaded and added to Wiki pages individually. Images cannot be uploaded while editing a page, so be sure to upload any images you intend to use before creating or editing an article. If you need to upload an image during an editing session, be sure to save the page first.

  1. Prepare the file for upload. Make sure the file is exactly as you want it.
  2. In the left sidebar, under “tools”, click “upload file.”
  3. Click “Browse” next to the “Source filename:” to locate the file on your computer (the name of the “browse” button depends on your web browser).
  4. Change the “Destination filename:” to something descriptive, if necessary.
  5. Fill in the “Summary,” if necessary.
  6. Click the “Upload file” button.

Maximum file size: 8 MB

Image Syntax

The full syntax for displaying an image is:

 [[File:{file_name}|{options}]]

Where options can be zero or more of the following, separated by pipes:

  • border, frame, thumb, or frameless: Controls how the image is formatted
  • left, right, center, none: Controls the alignment of the image within a text
  • baseline, sub, super, top, text-top, middle, bottom, text-bottom: Controls the vertical alignment of the image within a text
  • {width} px: Resizes the image to the given width in pixels
  • {width}x{height}px: Resizes the image to fit within the given width and height in pixels; it is possible to specify only the height by writing x{height}px
    • Note that the image will always retain its aspect ratio.
  • link={destination}: Allows to link to an arbitrary title, URL or just nowhere
    • link= : Will display an image without link, e.g.



[[ File:Name.jpg|20px|link=Help:Images]]

    • Note that link cannot be used in conjunction with thumb as thumb is always meant to link to the larger version of the image. In addition, link cannot be used with frame.
  • alt={alternative text}: For changing the alternative text (alt="") of an image
  • Special cases:
    • page=1: Displays the specified page when showing a djvu or pdf file

The options can be given in any order. If the given options conflict each other, the latter is applied, except for the format options, where the options take the priority in the order of frame, thumb, and frameless and/or border. If a given option does not match any of the other possibilities, it is assumed to be the caption text. Caption text can contain wiki links or other formatting.

Image Formatting

The following table shows the effect of all available formats.

When the height of an image in thumbnail is bigger than its width and you find it too outstanding, you may try the option upright, which will try to adjust its size to more desirable size.

Note that by writing thumb={filename}, you can use a different image for the thumbnail.

Image Alignment

Note that when using frame or thumb, the default alignment will be right.

Description You type You get
no alignment specified, or default alignment
... text text text
[[File:Example_image.png|caption]]
text text text ...

text text text text text text text text text text text text text text text text text text text text text text text caption text text text text text text text text text text text text text text text text text text text text text text text


specify alignment as none
... text text text
[[File:Example_image.png|none|caption]]
text text text ...

text text text text text text text text text text text text text text text text text text text text text text text

caption

text text text text text text text text text text text text text text text text text text text text text text text


center
... text text text
[[File:Example_image.png|center|caption]]
text text text ...

text text text text text text text text text text text text text text text text text text text text text text text

caption

text text text text text text text text text text text text text text text text text text text text text text text


left
... text text text
[[File:Example_image.png|left|caption]]
text text text ...

text text text text text text text text text text text text text text text text text text text text text text text

caption

text text text text text text text text text text text text text text text text text text text text text text text


right
... text text text
[[File:Example_image.png|right|caption]]
text text text ...

text text text text text text text text text text text text text text text text text text text text text text text

caption

text text text text text text text text text text text text text text text text text text text text text text text

Vertical alignment

text text



[[ File:Example_image.png|20px]]

text text



[[ File:Example_image.png|20px|baseline]]

text text



[[ File:Example_image.png|20px|sub]]

text text



[[ File:Example_image.png|20px|super]]

text text



[[ File:Example_image.png|20px|text-top]]

text text



[[ File:Example_image.png|20px|middle]]

text text



[[ File:Example_image.png|20px|bottom]]

text text



[[ File:Example_image.png|20px|text-bottom]]

results in (the text is underlined to show the result more clearly)

text text Example image.png text text Example image.png text text Example image.png text text Example image.png text text Example image.png text text Example image.png text text Example image.png text text Example image.png

Size and Frame

Among different formats, the effect of the size parameter may be different, as shown below.

  • When the format is not specified, or only bordered, the size can be both reduced and enlarged.
  • An image with frame always ignores the size specification.
  • The size of an image with thumb and frameless can be reduced, but can not be enlarged beyond the original size of the image.

For how it appears when its size is not specified, see Format section above.

Stopping text flow

On occasion it is desirable to stop text from flowing around an image. Depending on the web browser's screen resolution and such, text flow on the right side of an image may cause a section header (for instance,



== My Header == ) to appear to the right of the image, instead of below it, as a user may expect. The text flow can be stopped by placing



<br style="clear: both" /> before the text that should start after the image.

Gallery of images

It's easy to make a gallery of thumbnails only, not other images, with the



<gallery> tag. The syntax is:




<gallery> File:Image Name.ext|caption

File:Image Name.ext|caption
{...}
</gallery>

Note that the image code is not enclosed in brackets when enclosed in gallery tags.

Captions are optional, and may contain wiki links or other formatting.

for example:




<gallery> File:Example_image.png|Item 1

File:Example_image.png|a link to



[[ Help:Contents]]

File:Example_image.png
File:Example_image.png
File:Example_image.png|



''italic caption'' File:Example_image.png|on page "



{{ PAGENAME}}"

</gallery>

is formatted as:

Parameters

The gallery tag itself takes several additional parameters:

<gallery {parameters}>
{images}
</gallery>
  • caption={caption}: sets a caption on the gallery.
  • widths={width}px: sets the widths of the images.
  • heights={heights}px: sets the (max) heights of the images.
  • perrow={integer}: sets the number of images per row.