The AttachPlugin renders Attachment files inline in page content. Image attachments display as clickable thumbnails; all other files display as styled download links. See Plugins for a complete list of available plugins.
[{ATTACH src='/images/sample-mountains.jpg' caption='Mountain Vista' width='300'}] renders as:
For file attachments (PDF, spreadsheet, etc.) use the filename of a file uploaded via Attachments:
[{ATTACH src='report.pdf' caption='Download the Report'}]
Or using the legacy positional form (JSPWiki syntax):
[{ATTACH filename.pdf}]
[{ATTACH photo.jpg|Caption Text}]
| Parameter | Description | Example |
|---|---|---|
src | Filename, absolute path, URL, or media://filename | src='/images/sample-mountains.jpg' |
| Parameter | Description | Example | Default |
|---|---|---|---|
caption | Caption text (also used as alt text for images) | caption='Mountain Vista' | Filename |
align | Alignment | align='left', align='right', align='center' | None |
display | Image display mode (images only) | display='float', display='block', display='inline', display='full' | block |
style | Custom inline CSS | style='border-radius: 8px;' | None |
class | Custom CSS class | class='featured-doc' | None |
target | Link target | target='_blank' | _blank for files |
width | Image width (images only) | width='300' | Original |
height | Image height (images only) | height='200' | Original |
When src resolves to an image (.jpg, .jpeg, .png, .gif, .webp, .svg, .bmp), the plugin renders a clickable thumbnail linking to the full-size file.
display='block' (Default)Image in its own block, no text wrapping.
[{ATTACH src='/images/sample-ocean.jpg' align='center' display='block' caption='Ocean Horizon' width='400'}] renders as:
display='float'Image floats to one side; text wraps around it. Use with align='left' or align='right'.
[{ATTACH src='/images/sample-forest.jpg' align='left' display='float' caption='Forest Trail' width='260'}] renders as:
display='inline'Image flows inline with text — useful for small icons.
[Inline: <span data-jspwiki-placeholder="d0d55497-34"></span> in the text.] renders as:
Inline: /images/sample-sunset.jpg in the text.
display='full'Full-width image spanning the entire container.
[{ATTACH src='/images/sample-mountains.jpg' display='full' caption='Mountain Vista — full width'}] renders as:
For non-image files the plugin renders a typed download link with an icon. Upload files via the Attachments panel first, then reference by filename:
[{ATTACH src='report.pdf' caption='Download the Report'}]
[{ATTACH src='data.xlsx' caption='Spreadsheet Data'}]
[{ATTACH src='archive.zip'}]
Supported icon types: PDF, Word, Excel, PowerPoint, archive, audio, video, text, and generic.
| Value | Description |
|---|---|
left | Align left (or float left in float mode) |
right | Align right (or float right in float mode) |
center | Center the image |
src is resolved in this order:
| Step | Trigger | Behaviour |
|---|---|---|
| 1 | src starts with media:// | Looked up in the Media library by filename — no upload needed |
| 2 | src starts with http://, https://, or / | Used as-is |
| 3 | Plain filename | Current page's attachments (exact filename match) |
| 4 | Plain filename | Global attachment search across all pages |
| — | No match | [Attachment not found: filename] shown instead |
If the Media feature is enabled, reference library photos without uploading them:
[{ATTACH src='media://IMG_1234.jpg' align='left' display='float' caption='Family Trip 2024'}]
display='block' to rule out float/layout issuesdisplay='float' explicitlyalign='left' or align='right'See Attachments for uploading files, Using ImagePlugin for the image-only plugin, and Media for the media library.