Special Templates / Image

Sub-page of SpecialTemplates

The image template special:img allows you to add inline images to a wiki page. It has more options than the simple inlining via a bracket link.

Parameters

Every image template must have two parameters: a text describing the image and the URL of the image itself. Both parameters are anonymous parameters, the description comes first (like in bracket links):

 {{special:img | a short description | http://senseis.xmp.net/images/stone-happy.png }}

The description is put into the HTML alt and title attributes.

Other (optional) parameters are:

title
If you like, you can set the text for the HTML title attribute separately from the alt-text. Browsers usually show the text of the title if you move your mouse over the image.
link
add a link to the image. By default images do not link anywhere.
caption
add a caption to the image. If a caption is set, then the image is automatically floated to the right. You can use normal wiki markup inside the caption (but be careful not to interfer with the template syntax)
float
the image position can be set to left or right. If set, text flows around the image.
width
width of the image in pixels. Just put a number there, like width=200
height
height of the image in pixels.

Examples

A basic image (short syntax):

 {{:img | happy stone | http://senseis.xmp.net/images/stone-happy.png }}

yields: happy stone

Using a thumbnail image and link to another page:

 {{:img | atari | atari:i | link=Calling Out Atari}}

yields: atari

Adding a caption to an image, floating on left side:

 {{:img | goban | http://senseis.xmp.net/images/goban-alignright.jpg | caption=A game in progress | float=left}}

goban
A game in progress

The following text floats around the image. Use 4-% to clear the floating, like you do, when forcing a text below a diagram.


Special Templates / Image last edited by Unkx80 on May 18, 2010 - 08:25
RecentChanges · StartingPoints · About
Edit page ·Search · Related · Page info · Latest diff
[Welcome to Sensei's Library!]
RecentChanges
StartingPoints
About
RandomPage
Search position
Page history
Latest page diff
Partner sites:
Go Teaching Ladder
Goproblems.com
Login / Prefs
Tools
Sensei's Library