<< | Cookbook-V1 | >>

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Implement an improved support for image galleries as described in ImageGalleryPlain.

One might ask, why not use an existing gallery solution? It is the combination of Wiki and gallery that makes the difference. Setup a gallery very easily and refing the image descriptions as wiki pages.


  • download and extract into your local directory.
  • create a new Wiki Group e.g. MyGallery
  • create a <yourgroup.php> file and include GalleryAdv.php there. This makes the group to be a Gallery:
      <?php include_once("local/GalleryAdv.php"); ?>
  • Create a Thumbnail page. This can be the HomePage
    • Note that this can even be the WebMenu page.
  • Create GroupHeader similar to (make sure to end the GroupHeader with a new line
     .imagetrail HomePage
     || align=center width="100%"
     || Attach:ImageGalleryAdv.jpg Δ ||
  • Add the first images to the thumbnail page by .image <imagename> <size> <title> .image img01 100 Over the rainbow
  • The thumbnail page now shows the files to be uploaded. Upload the file in its maximum desired size. Usually this is the size as it is shown on the image page. The thumbnail file is generated on the fly.

available markup

    .imagetrail <HomePage>       -- generate a WikiTrail with images
                                        similar to <|HomePage|>

    .image <name> <size> <title> -- display a thumb entry on the gallery
                                    home page

                                    also create an image trail entry

The following parameters apply:

<name>the base name of the image without extension. It will be used to create the appropriate files.
<size>this is the size in pixels. If the image does not exist in the desired size, it will be generated and added to the attachments. The size is included in the filename. Specific values might be auto, thumb, original
<title>the title of the image
<HomePage>This page is used to control the navigator sequence. Works similar to PmWiki/WikiTrails

This markup can be used in the following way:

  • collect the gallery home page
  • generate default image pages


Such a gallery runs at


See Development/ImageGalleryAdv for the original specification.

Urgent improvements:

  • .image markup requires one line per thumbnail. Should be replaced by something which also works inline. I tried it, but could not make it work due to lack of skills.
  • There should also be a specific markup for the image pages, which allow to adjust scaling and to avoid the naming convention being used in GroupHeader.

Further improvements see Development/ImageGalleryAdv.


  • Bernhard Weichel
  • Christian Weichel who impelemented the function to rescale images.
  • Patrick Michaud reviewed Development/ImageGalleryAdv and gave very helpful hints.


Updated with automatic thumbnail generator
First Implementation

pmwiki-2.3.34 -- Last modified by {{Bernhard Weichel}}

from IP: ip should be disabled by default for security reasons