MicroAlbum v2.5

By Gaby Vanhegan, 20090712

A photo gallery script written in PHP, with an emphasis on simplicity, ease of installation and usage. It does not have a million features, nor does it have a thousand configurations, skins or plugins. It is intended to be small, simple and fast.

It works on the principle that you create one folder for each photo album, and you put the pictures you want into that folder. The script does the rest.


MicroAlbum offers some customisation features to let you change the look and feel of the album; you can add your own stylesheet, and customise the headers and footers.

The software is BSD licensed so you can do what you want with it. For information view the LICENSE.txt file.

Changes in V2.5a

Changes in V2.5

Changes in V2.4

Changes in V2.0

Completely rewritten as a class. Much cleaner, more manageable code.



Demo Site

MicroAlbum Demo

Custom CSS Demo

Custom Headers/Footers Demo


Latest version: microalbum-2.5a.tgz (25497 bytes)

MD5 (microalbum-2.5a.tgz) = c9053b7b36afeddc1e600e1e604b2e8c



Old Versions

Latest version: microalbum-2.5.tgz (28362 bytes)

microalbum-2.0.tgz (24555 bytes)

MD5 (microalbum-2.0.tgz) = 06f2b201b8753a497588135abfb08d10

microalbum-2.4.tgz (27555 bytes)

MD5 (microalbum-2.4.tgz) = 653ca620816d98a537019d7ea9020bff

See it in Action


This site uses custom headers and footers to embed MicroAlbum into the site layout.

Quick Installation

  1. Download and place the script in your web folder.
  2. Open the script and set base_folder, gen_folder and admin_pass.
  3. Create your albums, one per folder, inside base_folder.
  4. Create gen_folder, and ensure that the web server can write to it.
  5. All done!

For more detailed instructions see the full install guide.

Help, Support, Feature Requests, Bug Reports

For help and support you can contact Gaby here. Feature requests and bug reports can also be sent, but bear in mind that this is intended to be a simple and uncomplicated piece of software, so extra features may be kept to a minimum.


There are very few requirements for MicroAlbum:

Most installations of PHP will have these options already, and later versions of PHP come with GD built-in. It does not require a database connection, or any external packages, other than those listed above.

Full Installation Guide

  1. Download the micralbum.php script and save it somewhere in your webspace.
  2. Open up the script in a text editor. At the top of the script you should be able to configure the script to suit. As a bare minimum, you should set:
  3. Make sure that gen_folder exists in base_folder, and that the user that the web server runs as can write to this folder. For example, if your web server runs as user www, and that user is in group www, then this is advisable:
    # mkdir generated/
    # chgrp www generated/
    # chmod g+w generated/
    This creates the folder 'generated', changes it's group to www, and then allows users in group www to write to it. This will allow the webserver to save your thumbnail, previews and album data in this folder.
  4. That's it. Now go to the page in a web browser and check that it works.

Creating new albums

MicroAlbum expects each folder in base_folder to be a photo album, and for it to contain the photos you want in that album. To create a new album, just create a new folder in base_folder, the name of the folder being the name that you want the album to have.

For example, to create an album called 'My Holiday Album', just create a folder with the name 'My Holiday Album', and put your holiday snaps into it. MicroAlbum will do the rest for you.

Basic Configuration

The basic nuts and bolts that you have to set before you can use the software safely.

JSON Output

You can access your albums through a new JSON interface which allows you to access your MicroAlbum data, thumbnails, previews and images however you like. If you have an application that can read and parse a JSON file then you are set.

Using the JSON interface

MicroAlbum can provide JSON data files for 2 areas, the list of albums that you have and any given album. To access the JSON data listing in either case, simply add the format=json to the URL. For example, if your MicroAlbum installation is accessed here:


To access the JSON version of this page you would go here:


This will give you a complete listing of all your albums, their last modification date and a randomly selected thumbnail from that information. Details are provided about each thumbnail too, from it's dimensions, path and URL.

If you were viewing a single album:


To access the JSON version of this page you would go here:



There are a number of access keys built in that enable you to navigate around albums using the keyboard. On a Mac, you press the control key and the access key (ctrl-n for example), and on Windows you press the alt key and the access key (alt-n).

When viewing an album in preview mode

Access Key Action
a Toggle between viewing all photos in the album or just one page at a time.
s Start viewing the album as a slideshow.
n Go to the next page of photos.
p Go to the previous page of photos.
f Skip to the first page of photos.
l Skip to the last page of photos.
b Go back to the list of albums.
e Go to the edit screen for the album.

When viewing a picture

Access Key Action
n Go to the next picture in the album.
p Skip to the previous picture in the album.
f Skip to the first picture in the album.
l Skip to the last picture in the album.
b Go back to the whole album view.
s Start or stop the slideshow.
v View the current picture at full size (in a new window).

When editing an album

Access Key Action
s Go to the album sorting screen.
c Go to the caption editing screen.
r Go to the picture rotation screen.
b Go back to viewing the album.

When editing the album list

Access Key Action
b Go back to the list of albums.


There are a number of ways to customise the album to make it fit in with your site design, from changing the title of the album to adding custom CSS, headers and footers.

Advanced Customisation

There are some advanced configuration options, but most of the time you won't want to set these as the defaults are sensible.