Help:Images

From Ameliapedia
Revision as of 14:38, 9 February 2009 by Moleski (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
PD {{{text}}}|Important note: When you edit this page, you agree to release your contribution into the public domain. If you don't want this or can't do this because of license restrictions, please don't edit. This page is one of the Public Domain Help Pages, which can be freely copied into fresh wiki installations and/or distributed with MediaWiki software; see Help:Contents for an overview of all pages. See Project:PD help/Copying for instructions.}} PD


This page explains the image syntax when editing the wiki. Before using images in your page, your wiki must have file uploads enabled (see the {{ #ifeq:

 tighar.org

| www.mediawiki.org | technical manual | technical manual }} for details) and you have to upload a file.

Description You type You get
Embed imagebr / (with alt text)

codenowikiSunflowers/nowiki/code

Sunflowers

Link to description page

codenowikiImage:Example.jpg/nowiki/codebr / codenowikiSunflowers/nowiki/code

Image:Example.jpgbr / Sunflowers

Link directly to file

codenowikiMedia:Example.jpg/nowiki/codebr / codenowikiSunflowers/nowiki/code

Media:Example.jpgbr / Sunflowers

Thumbnailbr / (centered, 100 pixelsbr / wide, with caption) codenowiki
Sunflowers
/nowiki/code
Sunflowers
Borderbr / (100 pixels) br / Results in a very small gray border -- Note: because the fine gray border can not be seen when used on Image:Exaple.jpg (sunflowers image), an image with a white background is used --

codenowiki/nowiki/code

Framelessbr /Like thumbnail, respect user preferences for image width but without border and no right float.

codenowiki/nowiki/code

Syntax

The full syntax for displaying an image is:

codenowiki[[Image:{name}|{options}]]/nowiki/code

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

  • codethumb/code, codethumbnail/code, codeframe/code, or codeframeless/code: Controls how the image is formatted
  • codeleft/code, coderight/code, codecenter/code, codenone/code: Controls the alignment of the image on the page
  • codebaseline/code, codesub/code, codesuper/code, codetop/code, codetext-top/code, codemiddle/code, codebottom/code, codetext-bottom/code: Controls the vertical alignment of the image on the page
  • code{width}px/code: Resizes the image to the given width in pixels
  • Special cases:
    • codepage=1/code: Displays the specified page when showing a djvu file
  • codelink={destination}/code: Allows to link to an arbitrary title, URL or just nowhere (1.14+)
  • codealt={alternative text}/code: For changing the alternative text (codealt=/code) of an image (1.14+)

The options can be given in any order. 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.

Frame

The following table shows the effect of all available frame types.

Help:Images/frameHelp:Images/frameHelp:Images/frameHelp:Images/frame
You type You get

Size and Frame

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

Help:Images/sizeHelp:Images/sizeHelp:Images/sizeHelp:Images/size
Frame You get

Border and Frame

Help:Images/borderHelp:Images/borderHelp:Images/borderHelp:Images/border
Frame You get

Alignment

codenowiki/nowiki50px/code (no alignment specified, or default alignment) 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 text text text text

codenowikinone/code (specify alignment as none) none none none none none none none none none none

none none none none none none none none none none

codenowikicenter/code center center center center center center center

center center center center center center center

codenowikileft/code left left left left left left left left left left

left left left left left left left left left left left left left left left left left left left left

codenowikiright/code right right right right right right right right

right right right right right right right right right right right right right right right right right right

Other files

You can link to an external file using the same syntax used for linking to an external web page.

  • codenowiki[1]/nowiki/code

Or with different text:

If it is enabled on your wiki (see {{ #ifeq:

 tighar.org

| www.mediawiki.org | Manual:$wgAllowExternalImages | Manual:$wgAllowExternalImages }}), you can also embed external images. To do that, simply insert the image's url:

  • codenowikihttp://url.for/some/image.png/nowiki/code

Gallery of images

It's easy to make a gallery of thumbnails only, not other images, with the codenowikigallery/nowiki/code tag. The syntax is: pre gallery Image:{filename}|{caption} Image:{filename}|{caption} {...} /gallery /pre Note that the image code is not enclosed in brackets when enclosed in gallery tags. br Captions are optional, and may contain wiki links or other formatting.

for example: pre gallery Image:Example.jpg|Item 1 Image:Example.jpg|a link to Help:Contents Image:Example.jpg Image:Example.jpg Image:Example.jpg|italic caption Image:Example.jpg|on page Images /gallery /pre is formatted as: gallery Image:Example.jpg|Item 1 Image:Example.jpg|a link to Help:Contents Image:Example.jpg Image:Example.jpg Image:Example.jpg|italic caption Image:Example.jpg|on page Images /gallery

Parameters

The gallery tag itself takes several additional parameters: pregallery {parameters} {images} /gallery/pre

  • codecaption={caption}/code: sets a caption on the gallery.
  • codewidths={width}px/code: sets the widths of the images.
  • codeheights={heights}px/code: sets the (max) heights of the images.
  • codeperrow={integer}/code: sets the number of images per row.

See also

External Link