"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
| Name | Mandatory | Allowed Values | Default Value | Description |
|---|---|---|---|---|
| reference | Yes | A wiki reference or a URL | N/A | Defines the location of the image (e.g. some-image.png, [email protected]) |
| size | Yes | "small", "medium", "large" or "extra" | N/A | The size of the image, as follows: |
| alt | No (but recommended) | Free text | N/A | A description of the image. Used to improve accessibility |
| caption | No | Free text | N/A | A 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:

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:

The XWiki logo