Articles by alphabetic order
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
 Ā Ī Ñ Ś Ū Ö Ō
1 2 3 4 5 6 7 8 9 0


Help:Images

From Tibetan Buddhist Encyclopedia
Jump to navigation Jump to search

Rendering a single image

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; e.g. [[File:Example.jpg|20px|link=http://www.wikipedia.org]] renders as Example.jpg (external link), or [[File:Example.jpg|20px|link=MediaWiki]] renders as Example.jpg (internal link).
    • link= (with an empty value) — Displays an image without any activable link; e.g. [[File:Example.jpg|20px|link=]] renders as Example.jpg.
      • ! If you set |link=| (empty), then no title will be rendered.

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 tooltip text in any other format.

Caption text displayed in the thumb and frame formats may contain wiki links and other formatting.

MediaWiki extensions can add additional options.

If 'alt' is not specified and a caption is provided, the alternative text will be created automatically from the caption, stripped of formatting.

See Also