Difference between revisions of "Help:Adding Media"

From Kumu Wiki - TRU
Jump to navigation Jump to search
m
Line 1: Line 1:
Before you embed a picture on a Kumu page, it must first be [https://kumu.tru.ca/Special:UploadWizard|uploaded to the wiki]. To do this, go to the [[Special:Upload|Upload File]] page which should also be on the left navigation bar under toolbox.  
+
Before you embed a picture on a Kumu page, it must first be uploaded [https://kumu.tru.ca/Special:UploadWizard|uploaded to the wiki]. To do this, go to the [[Special:Upload|Upload File]] page which should also be on the left navigation bar under toolbox.  
  
 
==Adding a Picture to a Kumu Wiki Page==
 
==Adding a Picture to a Kumu Wiki Page==

Revision as of 09:28, 26 August 2014

Before you embed a picture on a Kumu page, it must first be uploaded to the wiki. To do this, go to the Upload File page which should also be on the left navigation bar under toolbox.

Adding a Picture to a Kumu Wiki Page

External image syntax

Help:Adding Media/Images and Pictures/External Image Syntax

Internal image syntax

Help:Adding Media/Images and Pictures/Internal Image Syntax

Image Options

Help:Adding Media/Images and Pictures/Image Options

Additional Image Display Options

Resizing option

Change the size of the image using the following parameters:

  • {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 reasonnable 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 in size if it's not in a scalable media type such as SVG (bitmap images cannot be scaled up). The default maximum size depends on the format and the internal image dimensions (according to its media type).

Examples:

Width Option Code to Use Example Image
Image 50 pixels wide [[File:ExampleImage.jpg|50px|This is the caption]] This is the caption
Image 100 pixels wide [[File:ExampleImage.jpg|100px|This is the caption]] This is the caption
Image 200 pixels tall [[File:ExampleImage.jpg|x200px|This is the caption]] This is the caption

Horizontal alignment option

one of left, right, center, none; This controls the horizontal alignment (and inline/block or floating styles) of the image within a text (no default value).

Examples:

Format Option Code to Use Example Image
Left Aligned Image (sized to be 50 pixels wide) [[File:ExampleImage.jpg|50px|left|This is the caption]]
Right Alight Image (sized to be 50 pixels) [[File:ExampleImage.jpg|50px|right|This is the caption]]

Vertical alignment option

one of baseline, sub, super, top, text-top, middle, bottom, text-bottom; ThisControls the vertical alignment of a non-floatting inline image with the text before or after the image, and in the same block (the default vertical alignment is middle).


Examples:

Format Option Code to Use Example Image
Top Aligned Image (sized to be 100 pixels wide) [[File:ExampleImage.jpg|100px|top|This is the caption]] Here is some textThis is the captionHere is some text
Bottom Alight Image (sized to be 100 pixels) [[File:ExampleImage.jpg|100px|bottom|This is the caption]] Here is some text This is the caption Here is some text

Link option

  • 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) — Displays an image without any activable link; e.g. [[File:ExampleImage.jpg|20px|link=]] renders as 20px.
Note that the link option cannot be used in conjunction with thumb or thumbnail, as thumb is always meant to link to the larger version of the image. In addition, link cannot be used with frame.

Other specific options:

  • alt={alternative text} — 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>. For example, [[File:ExampleImage.jpg|20px|<span title=""></span>]] renders as File:ExampleImage.jpg

Embedding an Image Hosted on Another Website

If an image is hosted on another website, it can also be displayed on the UBC Wiki:

Formatting Example of Wiki Code to Use Display
Just add the image URL to the wiki page http://farm4.static.flickr.com/3220/2882594321_bdaf3dcb3b.jpg For example, 2882594321_bdaf3dcb3b.jpg.
To provide attribution for a photo (for instance if it is a Creative Commons Licensed work on Flickr), upload the photo and put it in a frame with attribution [[Image:Pinnochio in Urbino.jpg|center|frame|Uploaded to Flickr by [http://www.flickr.com/photos/38795936@N00/2882594321/sizes/m/ Sparklefish]]]

Direct Text Link to a Uploaded File

Instead of displaying a file on a wiki page, it's also possible to create a text link directly to the file itself. There are two options when linking to an uploaded file.

Formatting Wiki Code Display
Direct Link to Uploaded File [[Media:file-name.ext]]. For example, [[Media:Filelink-button.png]]. For example, Media:Filelink-button.png.
Link to the Wiki's Uploaded File [[:File:Filelink-button.png]]. File:Filelink-button.png.

See Also