Photo Album Macro

Last modified by Gonzalo Jara on 2021/03/17 21:41

cogDisplay all image attachments with the {{gallery}} macro and show thumbnails of the images
Developed by

Bernhard Hopf

0 Votes
LicenseGNU Lesser General Public License 2.1


this macro displays all image attachments with the {{gallery}} macro as slide-show and shows thumbnails of the images. By clicking on the thumbnail the original image is displayed.



You only have to attach images to a wiki document and place the macro {{photoalbum/}} where you want on the page. All attachments which are images are displayed as slideshow and thumbnails. You can change the size of the image and the size of the thumbnails which affects the download time if you have images with high resolution or slow internet connection. You can customize the look by passing parameters to the macro.


All parameters are optional!

ThumbSizeListList of selectable thumbnail sizes seperated by space. Use - to disable the change of thumbnail size.50 100 200 300
ImageSizeListList of selectable image sizes seperated by space. Use value "original" to use the original uploaded image without resizing. Use - to disable the change of image size.400 600 800 1000 1920 original
DefaultThumbSizeInitial thumbnail size.200
DefaultImageSizeInitial image size.800


{{photoalbum DefaultImageSize="800" ImageSizeList="-" /}}
Show images with specified size and disable change of image size.
{{photoalbum ImageSizeList="-" ThumbSizeList="-" /}}
Disable change of image and thumbnail size. No input fields are displayed.
{{photoalbum ImageSizeList="800 original" ThumbSizeList="100 200" DefaultImageSize="800" DefaultThumbSize="100" /}}
All default values are overwritten with own values

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

Then visit the Macros.PhotoAlbum page.

Release Notes


Add parameter "Sort".
Valid values are name, type, size, author or date.

Thankt to Raluca Stavro, creator of the Attachments Macro.


Make image reference absolute


First version

Tags: image macro

Get Connected