"Image" Macro

Last modified by Vincent Massol on 2026/04/07 16:15

Content

Reference

Description

Documentation 1.13+ Use this macro for displaying a single image. For displaying several images next to each other, use the Gallery Macro. The advantage of using this macro is to have a consistent L&F across all images in your documentation.

Usage

{{image reference="..." size="..." alt="..." caption="..."/}}

Parameters

NameMandatoryAllowed ValuesDefault ValueDescription
referenceYesA wiki reference or a URLN/ADefines the location of the image (e.g. some-image.png, [email protected])
sizeYes"small", "medium", "large" or "extra"N/A

The size of the image, as follows:
extra: width of the image = 960px; (used for whole interface screens)
large: width of the image = 650px;
medium: width of the image = 350px;
small: width of the image = 150px;

altNo (but recommended)Free textN/AA description of the image. Used to improve accessibility
captionNoFree textN/AA caption displayed under the image

Examples

Example 1: Basic

{{image reference="image-name.png" size="small" alt="A good alternative text for the image"/}}

Results in:

http://www.xwiki.org/xwiki/bin/download/DownloadCode/DownloadFeedback/xwiki.png

Example 2: With a Caption

{{image reference="image-name.png" size="medium" alt="A good alternative text for the image" caption="The XWiki logo"/}}

Results in:

http://www.xwiki.org/xwiki/bin/download/DownloadCode/DownloadFeedback/xwiki.png
The XWiki logo

Get Connected