Photo Album Macro

Last modified by Gonzalo Jara on 2024/07/05 18:10

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

xwiki:XWiki.BernhardH

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Description

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.

photoalbumsample.jpg

Usage

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.

Parameters

All parameters are optional!

ParameternameDescriptionDefaultvalue
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

Samples

{{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

v1.2

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

Thankt to Raluca Stavro, creator of the Attachments Macro.

v1.1

Make image reference absolute

v1.0

First version

Get Connected