The Image plugin allows one to have finer control over the layout of images than just the simple in-lining of images.


src = 'Image source'
This can either be a full URL (http://..) or a WikiAttachment. name. Required.
align = 'left|right|center'
The image alignment.
height = 'integer'
Force the height of the image.
width = 'integer'
Force the width of the image.
alt = 'alt text'
The alt text of an image. This is very useful when doing pages that can be navigated with text-only browsers.
caption = 'caption text'
The text that should be shown as a caption under the image.
link = 'hyperlink'
A hyperlink (http://..). In the future, you can also use WikiPages..
border = 'integer'
Size of the image border.
style = 'style info'
Any style markup you would like to apply to the table surrounding the image.
class = 'class name'
Redefine the default class for this image, which is "imageplugin".


[{Image src='SandBox/test.png' caption='Testing Image' style='font-size: 120%; color: green;'}]

Shows the attachment SandBox/test.png with the caption Testing Image underneath it. The text is 120% in height and will be rendered in green color.

[{Image src='' 

Shows the Yahoo online / offline graphic and creates a link to Yahoo send message

While the ImagePluginWithThumbnails provides automatic creation of thumbnails from the full size image, it's also pretty complicated and not part of JSPWiki proper. But the Image plugin can do thumbnail links if you're willing to create the thumbnail images yourself, using the link attribute, e.g.,

[{Image src='images/ref/image_thumb.png' link='images/ref/image.png'}]

When you click on the image thumbnail the full size image will be displayed.


The table that encompasses the image. It consists of two subcategories:
img = IMG tag that gets embedded.
caption = caption that is embedded.


How should JSPWiki be configured so that relative file name can be used to identify an image. In my wiki, I need to write the full path, including the drive name, to get the in-line image to display.

--JohnBParker, 28-Apr-2006

John, you can use the Image plugin to do this. If you are planning to upload a bunch of images and have access to the wiki directory on the server you can put them all in, say, the existing 'images' directory. For myself, I wanted to keep the images used for the wiki itself separate from those used for my reference documentation, so I created a 'ref' subdirectory (i.e., '$JSPWIKI_HOME/images/ref/'). Then I can use relative links via the Image plugin, e.g.:

[{Image src='images/ref/penguin.png' alt='Adelaide Penguin'}]

It's also good practice to include alternate text using the 'alt' attribute (actually, this is a validation requirement in XHTML).

Hope that helps. -- MurrayAltheim

I am having some problems with .png images added using the plugin. jspwiki seems to think that they are some sort of links and is putting link image on top of the attached images.

with JPG and gif files it does not do this and does think that they are links.

i am not too experienced with this, i would really appreciate some help.

thanks R

--Rayalu, 20-Sep-2006

Rayalu, in the WEB-INF/ configuration file there should be a set of lines defining the image types you want to permit on your wiki. They must have distinct suffix numbers as described in the file following "Define which image types are inlined." The lines in the default are commented out, and the note states that by default JSPWiki recognizes PNG only.

For example, if you wanted your wiki to permit gif, jpg and png files, your properties file would contain:

jspwiki.translatorReader.inlinePattern.1 = *.gif
jspwiki.translatorReader.inlinePattern.2 = *.jpg
jspwiki.translatorReader.inlinePattern.3 = *.png

Since you state that you're not having any problems with JPG or GIF you may have a problem with this part of your configuration. If it's not that, you might check with another browser to see if it's browser-related and not actually a problem with JSPWiki itself.

Hope that helps. -- MurrayAltheim

I am trying to use the Core Image Plugin however I keep getting " Plugin insertion failed: Plugin failed". I am not sure what to do from here since I am not the system admin.

[{Image src='http://pathname/NavigationEditor.png'}]

Any clues?

--JoelleLam, 04-Jan-2007

How can I make caption to be aligned with image ? 'align' property applies only to image .

--AnonymousCoward, 22-Jan-2008

OK, I figured it out


--AnonymousCoward, 22-Jan-2008

How can I make the alt text (the caption for the image) appear at the top or the bottom? Right now, for me (build 2.6.2), it appears at the top only, but this page states it appears at the bottom.

--Karl Hansen, 11-Mar-2009 19:56

...that is, the caption= attribute.

--Karl Hansen, 11-Mar-2009 20:14

A map-attribute would be nice, where you can add a typical html-map. i know this is a security issue (html/js-injection), but perhaps this feature could be dependend on the jspwiki.translatorReader.allowHTML-setting. so it could be used for private and inhouse-wikis.

--FrankB, 15-Nov-2009 22:41


Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-47) was last changed on 11-Jul-2012 11:49 by lizhiqiang