GeoHazardWatch

Page Actions


Using AttachPlugin

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.

Syntax

[{ATTACH src='/images/sample-mountains.jpg' caption='Mountain Vista' width='300'}] renders as:

Mountain Vista

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}]

Parameters

Required Parameters

ParameterDescriptionExample
srcFilename, absolute path, URL, or media://filenamesrc='/images/sample-mountains.jpg'

Optional Parameters

ParameterDescriptionExampleDefault
captionCaption text (also used as alt text for images)caption='Mountain Vista'Filename
alignAlignmentalign='left', align='right', align='center'None
displayImage display mode (images only)display='float', display='block', display='inline', display='full'block
styleCustom inline CSSstyle='border-radius: 8px;'None
classCustom CSS classclass='featured-doc'None
targetLink targettarget='_blank'_blank for files
widthImage width (images only)width='300'Original
heightImage height (images only)height='200'Original

Image Attachments

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:

Ocean Horizon

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:

Forest Trail

display='inline'

Image flows inline with text — useful for small icons.

[Inline: <span data-jspwiki-placeholder="a9e2ac1d-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:

Mountain Vista — full width

File Attachments

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.

Alignment

ValueDescription
leftAlign left (or float left in float mode)
rightAlign right (or float right in float mode)
centerCenter the image

How Files Are Resolved

src is resolved in this order:

StepTriggerBehaviour
1src starts with media://Looked up in the Media library by filename — no upload needed
2src starts with http://, https://, or /Used as-is
3Plain filenameCurrent page's attachments (exact filename match)
4Plain filenameGlobal 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'}]

Troubleshooting

"Attachment not found"

  1. Verify the filename matches exactly (case-sensitive)
  2. Confirm the file has been uploaded to this page or another page
  3. Try uploading the file again via the attachments panel

Image not displaying

  1. Check that the file extension is a supported image type
  2. Verify the file was uploaded successfully
  3. Try display='block' to rule out float/layout issues

Text not wrapping around image

  1. Set display='float' explicitly
  2. Set align='left' or align='right'
  3. Ensure there is enough surrounding text to wrap

See Attachments for uploading files, Using ImagePlugin for the image-only plugin, and Media for the media library.

No footnotes on this page.

No comments yet.