EImage allows users to display images from external image hosts as if they were stored locally. External images may be thumbnailed/resized/framed just like local images and the syntax used is very similar to MediaWiki's Images syntax. EImage can also overlay text on top of images (based on Template:Annotated image).
Some of the features of EImage are:
- Display Imgur, Flickr, and regular image URLs.
- Display titles or comments from the image host.
- Overlay text ontop of images.
EImage has three types of options:
- Image: The "main" options for displaying the image. This is similar to MediaWiki's Images.
- Annotation Defaults: Default options that are applied to all annotations in the image.
- Annotations: This is a separate parser function for an annotation. You can have as many of these as you want.
The full syntax for displaying an image is:
{{#eimage:''image''|''options''|''caption''}}
Refer to http://www.mediawiki.org/wiki/Help:Images for detailed descriptions. Below is a list of options available in EImage:
- Image option: the ID or URL of the image to display
- Imgur usually has 5 to 7 character alphanumeric image IDs (e.g. KO5ZaTX) and Flickr has 10-digit image IDs (e.g. 8055532325).
- If a raw URL is entered, you will need to also specify the width and height.
- Format option: one of border and/or frameless, frame, thumb
- Resizing option: one of
- {width}px
- x{height}px
- {width}x{height}px
- Horizontal alignment option: one of inline and/or left, right, center, none
- The inline option displays the image(+frame) inline instead of as a floating block (it overrides the float option). Works best with none. Useful for displaying multiple thumbnails on one line.
- Vertical alignment option: one of baseline, sub, super, top, text-top, middle, bottom, text-bottom
- Link option: one of
- link={target}
- link=
- Currently only external links that start with http/https/ftp are supported.
- Other specific options:
- alt={alternative text}
Some examples:
{{#eimage:8055532325|800px|thumb|none|inline|'''!!TITLE!!'''<br />!!COMMENT!!}}
{{#eimage:nNBFF|x350px|thumb|link=}}
{{#eimage:http://upload.wikimedia.org/wikipedia/mediawiki/e/e1/Eimage_example.png|410x579px|thumb}}
These options change the defaults for all annotations in an image (not all images). If no annotations are used, these are ignored:
- Horizontal alignment option: aalign=
- Background color option: abg=
- Default is transparent
- Font family option: afamily=
- Font size option: asize=
- Font weight option: aweight=
- Font style option: astyle=
- Font shadow option: ashadow=
- Font color option: acolor=
- Line height option: aheight=
Each image can have any number of annotations. In the tag use the annot= option to specify an annotation. The value of annot= is another function called '. Below are the options available for ':
- Horizontal alignment option: one of left, right, center, justify, inherit
- Background color option: bg=
- Font family option: family=
- Font size option: size=
- Font weight option: weight=
- Font style option: style=
- Font shadow option: shadow=
- Font color option: color=
- Line height option: height=
Some examples:
{{#eimage:7942213966|200px|thumb|acolor=white|This is the comment from Flickr: !!COMMENT!!
|annot= |annot= |annot= |annot= |annot= |annot= }}
These are the sources I used for inspiration, ideas, and code.