Help:Images

From Transit.Wiki

This page explains the image syntax when editing the wiki. Before using images in your page, you have to upload a file first.

Syntax

The full syntax for displaying an image is:

[[File:{filename}|{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
  • link={destination}: Allows to link to an arbitrary title, URL or just nowhere (1.14+)
    • link=: Will display an image without link, e.g. [[File:Name.jpg|link=]].
    • Note that link cannot be used in conjunction with thumb or frame.
  • alt={alternative text}: For changing the alternative text (alt="") of an image (1.14+)
  • Special cases:
    • page=1: Displays the specified page when showing a djvu 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.

Link directly to file

You can use the pseudo-namespace “Media” to link directly to a file, bypassing the description page.