The {gallery} macro allows you to display a thumbnail image gallery on a page...
Although you can manually display images on a page, it can be a real pain if you have lots of images - this macro allows you to add a thumbnail image gallery to a page in seconds that shows all image attachments. When a thumbnail image is clicked, the corresponding full size image will be shown.
To add a gallery to your page, use:
{gallery:columns=x|title=whatever}
Parameters
Parameter
Required
Default
Notes
columns
4
The number of columns to use in the thumbnail gallery.
title
A custom title to display at the top of the gallery.
This macro is part of the standard Confluence Distribution.
This macro is part of the standard Confluence distribution, however it sometimes requires manual activation. If you would like it installed on your Builder account, please contact our Support Desk.
There is currently no dedicated issue tracking project for this macro.
In many cases, the default 4 column display as shown above will result in horizontal scrolling (if using the default 200px thumbnail size) on smaller screen resolutions - this will annoy people!
Navigate to the next example to find out how to reduce the number of columns and avoid unsightly layouts.
Number of columns
Generally, it's worth restricting the gallery to three columns as shown below:
It's a small touch, but makes the page look so much nicer - compare the gallery shown above to that shown in Example #3.
Hints and Tips
When uploading image attatchments, always give them a description - as you can see in the examples above, our Piano didn't have a description so it was the only image in the gallery not to show the instrument name below the picture.
For Builder themed accounts set to the standard 750px page width, the default display may force the page width to extend beyond the specified width - to get round this problem, either:
Use 3 columns in the gallery
Set the thumbnail size to 150px if you want to use 4 columns
Set the Builder page width to 100%
This macro shows images in the order they were uploaded - with the most recent images first. If you want to change the order of the images, the only way we are currently aware of is to re-upload images to move them to the top of the display, although this is a bit of a fudge, obviously!
Many modern browsers allow you to right-click an image to get it's URL - it's not recommended to do this with images in the gallery because they are referenced by index and as such if images are added and removed at a later date that index could end up pointing to a different image.
Frequently Asked Questions
Q
Can I show other types of media?
A
At present, only image formats such as PNG, JPEG and GIF are supported. Confluence 2.0 may provide additional media types (such as SWF, WMV, etc.) but we've not had chance to test yet.
When I use the gallery macro other images on the same page are lost. I am taking generic images from another location (Unable to render embedded object: File (IMAGE.JPG) not found.).
The Gallery Macro cause the other images to try and load from the same page.
The gallery macro resizes according to the screen resolution that a viewer uses, this means larger images (screenshots for example) are distorted or shrunk when using the gallery macro.
Is there a way to 'fix' the size of the gallery slideshow?
When I use the gallery macro other images on the same page are lost. I am taking generic images from another location (Unable to render embedded object: File (IMAGE.JPG) not found.).
The Gallery Macro cause the other images to try and load from the same page.
Any ideas would be welcome.
The gallery macro resizes according to the screen resolution that a viewer uses, this means larger images (screenshots for example) are distorted or shrunk when using the gallery macro.
Is there a way to 'fix' the size of the gallery slideshow?