Attachments
GeoHazardWatch supports attaching images, PDFs, and other documents to pages. Attachments are stored centrally and can be embedded or linked from any page.
Uploading Attachments
From the Navbar
- Click More… → Upload Attachment on any page
- Select a file, add an optional description, and click Upload
From the Editor
- Use the Insert Image section to upload and embed an image in one step
- Or click More… → Upload Attachment for any file type
Embedding Items in a Page
There are three ways to embed content — choose based on what you are embedding:
1. Uploaded Attachments — [{Image}] and [{ATTACH}]
Both plugins look up the file by name automatically. See the full parameter reference at Using ImagePlugin and Using AttachPlugin.
Embed an image (renders inline with layout options):
[{Image src='photo.jpg'}]
[{Image src='photo.jpg' caption='My Caption' align='left' display='float'}]
[{Image src='banner.jpg' display='full'}]
Embed any file — images render as clickable thumbnails; all other files render as download links with a type icon:
[{ATTACH src='report.pdf' caption='Q4 Report'}]
[{ATTACH src='photo.jpg' align='left' display='float' caption='Team Photo'}]
Quick insert from Browse — no typing required:
- While editing, click More… → Browse Attachments
- Click the green Insert button on any attachment
- The correct plugin syntax is inserted at your cursor
2. Media Library Photos — media:// URI
If the Media feature is enabled, you can embed photos from the media library without uploading them as attachments. Use the media:// prefix followed by the original filename:
[{Image src='media://IMG_1234.jpg' caption='Family Trip 2024' align='center'}]
[{ATTACH src='media://vacation.jpg' align='left' display='float'}]
The file is served from the media library; no upload is required. Access control is enforced — items linked to Private Pages are only visible to authorised users.
3. External Images — direct URL
Any src that starts with http://, https://, or / is used as-is:
[{Image src='https://example.com/image.jpg' caption='External photo'}]
[{Image src='/public/images/logo.png'}]
How Files Are Resolved
When you write [{Image src='photo.jpg'}] or [{ATTACH src='photo.jpg'}], the system resolves the file in this order:
media://prefix → looked up in the media library by filename- External URL / absolute path → used as-is
- Current page's attachments → exact filename match
- All pages' attachments → global filename search
If no match is found, a "not found" message is shown in place of the content.
Choosing Between [{Image}] and [{ATTACH}]
| Situation | Recommended plugin |
|---|---|
| Embed an image with layout control (float, block, full-width) | Either — both support the same display modes |
| Provide a download link for a PDF, spreadsheet, or archive | [{ATTACH}] — adds a type icon and link |
| Embed a media library photo | Either — use media://filename as src |
| Insert via Browse Attachments popup | Either — popup inserts the correct syntax |
The key difference: [{Image}] is image-only and defaults to a float layout. [{ATTACH}] handles both images and files, defaulting to a block layout for images and a download link for everything else. Both support the same align, display, caption, width, height, and style parameters for images.
See Using ImagePlugin and Using AttachPlugin for the full parameter reference.
Browsing Attachments
- All users: click More… → Browse Attachments to search, filter, and copy syntax
- Administrators: go to Management → Attachments (
/admin/attachments) for full management including delete
Storage
Attachments are stored centrally with:
- Content-based deduplication (same file stored once, regardless of which page it was uploaded on)
- SHA-256 hash-based filenames
- Schema.org metadata including uploader, page association, and MIME type
- Page mention tracking — the system records which pages reference each attachment
File Types and Limits
Allowed types and the maximum upload size are set by an administrator. Common defaults:
- Images: JPEG, PNG, GIF, WebP, SVG
- Documents: PDF, Word, Excel, text files
- Maximum size: 10 MB (configurable)
See Using ImagePlugin and Using AttachPlugin for full parameter references, Media for browsing and embedding media library photos, and Media Management for the administrator guide.
No comments yet.