This is my Gallery Site - I have created my own gallery scripts and Macro's - as no Confluence Plugins supports images in a filestructure.
Requirements
Software
Atlassian CLI (Notice the 3.X versions are not free, last free download versions at Atlassian CLI
Imagick and ffmpegthumbnailer installed, this can typically be done with a package manager for the OS.
Scripts
Gallery Configurations (config.txt)
Script for making thumbnail images (makethumbs.sh)
Script for importing images into a Confluence page (updateGallery.sh)
User Macros
User Macro: me-video - Linking to a Video file
One of these:
User Macro: me-image - Image lightbox with Slimbox2
User Macro: me-image - Image lightbox with OrangeBox
User Macro: me-image - Image lightbox with fancybox
User Macro: me-image - Image lightbox with Confluence style
The setup
Install the Software and packages needed
Config Tomcat to support symbolic links
Create a Script directory and place the 3 scripts and the config.txt files into them
Edit the config.txt to fit Your installation
Edit the makesymlinks.sh to fit Your installation
Start adding pictures to Your installation
The workings
All content (Pictures and Video) are place on the servers filesystem in a Tree Structure, from a Basic root (called ContentRoot in the config.txt file)
All the top directories under the ContentRoot are linked into the Confluence installation by the makesymlinks.sh script)
For each top directory, a subdirectory or one or more phrases, a collection of content can be placed on a Confluence Page with the updategallery.sh script
When the script runs, it travels an entire directory-structure and :
- Creates thumbnails for the content (image or video) in a subdir called something with "thumbs"
- Adds a macro onto the specified Confluence page to show (render) the content (image or video)
- Created a short link to the image - this link is md5 sum based, so even if the file changes name, the link will still work
- Finally, saves the page into Confluence
Questions and Answers
Q: Is there a manuel maintenance between the config.txt and the me-image macro?
A: Yes, the ThumbnailSize and DisplaySize numbers must match in the file and macro, otherwise the imagelinks will give 404
Q: My Thumbnail Image is not displayed?
A: Check the following:
- Tomcat Linking is allowed
- The Paths etc in the macro on the Confluence Page - does it exist in the filesystem
- Permissions on the filesystem
Q: Images are so slow...why?
A: This can be bandwith, server hardware, memory - or the DisplaySize parameter - hence how large an image that must be fetched. 800 is default.
Q: Why does the me-image macro have both an parth/image-name and md5 sum parameter
A: The path/image-name is pure legacy, the md5 is the future workings, as this better supports moving images around in dirs, or renaming them.