If you've seen a genuine article being vandalised, don't edit the change out unless it's minor or you have new information to add. Instead, edit a previous, non-vandalised version from the history or roll the article back to that edit - this way, information doesn't have to be constantly republished.
For cases of major vandalism or new articles being created with spam content, please post on User_talk:TeamCodex with the offending article so it can be brought to a Moderator's attention, if you cannot deal with it yourself.

Help:Images

From Gamescodex
Jump to: navigation, search
NoFile.png This page is broken and requires re-importing

This page was originally an import of a Public Domain Help Page as found on MediaWiki Meta. However, technical difficulties within Gamerpedia have removed or corrupted information and required formatting throughout the page, which has caused parts of it to become messy and/or unreadable.

If possible, capable editors should either re-include the missing information in their own words and in an acceptable style; or re-import the Public Domain pages (overwriting the current) and then restore content that may have been added to the local copies that are not reflected in the imported files. Tagged since April 2011


This page explains how to use images when editing Gamerpedia and various other Wikis. Note that before you can use any image on a page, the image must already exist or be uploaded to Gamerpedia, which can be done through Special:Upload.

Images that are stored on a MediaWiki server are usually rendered by using the File: namespace prefix (but the legacy Image: namespace prefix is still supported as a synonym) as the target of a MediaWiki link. The alternate Media: namespace prefix is also usable to reference the original media file content (for rendering or downloading it separately, out of any MediaWiki page).

Contents

[edit] Supported media types for images

The following file formats are supported by Mediawiki by default:

  • .jpg or .jpeg : bitmap image compressed in the standard JPEG format (this lossy format is most suitable for photographs).
  • .png : bitmap image in the Portable Network Graphics format (specified by the W3 Consortium).
  • .gif : bitmap image in the legacy Graphics Interchange Format.

In addition, Gamerpedia also allows use of the following formats:

  • .svg : scalable image in the Scalable Vector Graphics format (specified by the W3 Consortium). See Manual:Image_Administration#SVG.
  • .tiff : Tagged image format. Often used for high-resolution archival photographs. Often used with Extension:PagedTiffHandler.
  • .txt : Plaintext document. Not an image format, but treated similarly.
  • .guide : Plaintext document in the legacy Guide format. Allows basic formatting through use of tags, which will be treated as regular text by non-compatible word processors. This format is rarely used nowadays, although attempts have been made to reintroduce it.

Other wikis may have their own lists of supported formats.

[edit] How to show images on a page

[edit] The Basics

Making an image show on a page can be as simple as writing "File:" followed by the filename of the image in the page, and surrounding it by two square brackets. So, for example, if you wanted to show an image named "Example.jpg" on a page, you would type [[File:Example.jpg]] where you wanted it to appear.

Usually, however, you will want to allow the image to be made smaller to fit onto the page. To do this, add a pipe (|) after the file name, and type the word "thumb". You may also want to add a caption to the image in order to describe this. To do this, add another pipe, and type in your caption. So, if you wanted to make a smaller version of "Example.jpg" and describe it as "Some flowers", you would type this:

[[File:Example.jpg|thumb|Some flowers]]

[edit] Full Syntax

The full syntax for displaying an image is:

[[File:filename.extension|options|caption]]

where options can be zero or more of the following, separated by pipes (|):

  • Format option: one of border and/or frameless, frame, thumb (or thumbnail);
    Controls how the rendered image is formatted and embedded in the rest of the page.
  • Resizing option: one of
    • {width}px — Resizes the image to fit within the given maximum width in pixels, without restricting its height;
    • x{height}px — Resizes the image to fit within the given maximum height in pixels, without restricting its width;
    • {width}x{height}px — Resizes the image to fit within the given width and height in pixels;
    • upright — Resizes an image to fit within reasonable dimensions, according to user preferences (suitable for images whose height is larger than width).
    Note that the image will always retain its aspect ratio, and can only be reduced (not increased) in size unless it's in a scalable media type (bitmap images cannot be scaled up).
    The default maximum size depends on the format and the internal image dimensions (according to its media type).
  • Horizontal alignment option: one of left, right, center, none;
    Controls the horizontal alignment (and inline/block or floating styles) of the image within a text (no default value).
  • Vertical alignment option: one of baseline, sub, super, top, text-top, middle, bottom, text-bottom;
    Controls the vertical alignment of a non-floating inline image with the text before or after the image, and in the same block (the default vertical alignment is middle).
  • Link option: one of
    • link={target} — Allows to change the target (to an arbitrary page title, or URL) of the generated link, activable on the rendered image surface;
    • link= (with an empty value) — (MediaWiki 1.14+) Displays an image without any activable link; e.g. [[File:Example.jpg|20px|link=]] renders as 20px.
! Link does not work with thumb, thumbnail or frame.
  • Other specific options:
    • alt={alternative text} — (MediaWiki 1.14+) Defines the alternative text (maps to the HTML attribute alt="..." of the generated <image /> element) of an image that will be rendered if either the referenced image cannot be downloaded and embedded, or if the support media must use the alternative description text (e.g. when using a Braille reader or with accessibility options set by the user in its browser).
    • page={number} — Renders the specified page number (currently only applicable 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 (or thumbnail); frameless and/or border.

If a parameter does not match any of the other possibilities, it is assumed to be the caption text. Caption text shows below the image in thumb and frame formats, or as mouseover text in border, frameless formats or when the format is omitted. Caption text displayed in the thumb and frame formats may contain wiki links and other formatting. In the other options, wiki-formatting will not work though transclusion will.

If no caption text is supplied, a caption is automatically created showing the file name. To completely remove the caption, set it to <span title=""></span>.

Personal tools