Last updated 10 June 2011. Created on 7 January 2008.
Edited by batigolix, joachim, winston, ashtonium. Log in to edit this page.

The image gallery module lets you organize your image nodes into galleries, showing thumbnails that link to the image nodes. This levers Drupal's taxonomy, creating galleries as terms in a vocabulary.

  1. Enable the image gallery module
  2. Go to administer >> image galleries. You create galleries here the same way as taxonomy terms. Galleries can be nested.
  3. The module provides a menu item for your galleries, which is disabled by default. To enable it, go to admin >> build >> menu. Find the 'Image galleries' menu item in the Navigation menu settings (on Drupal 6 these are on a child page). Alternatively, you can create your own links and menus.

Galleries with Views

In versions 5.x-2.x-dev and 6.x-1.0 of the image module package, image galleries are optionally created with the Views module. This gives you considerable control over the display of image galleries. Install the Views module to get this functionality instead of the old built-in galleries, and enable the Views UI module to customize the views.

On Drupal 6

The gallery is made up of two views: the image_gallery view embeds the image_gallery_terms view in order to show the child galleries above the image nodes. This embedding is automatically done by the 'Gallery page' display.

Some points to note:
- If you set a different path for the gallery view, then standard taxonomy term links will not go to the view. You will need to either set the view field up to output differently, or use taxonomy_redirect module to output the term links for the galleries vocab to go to your view's path.

On Drupal 5

There are three default views provided:

  • image_recent: provides a Recent Image block showing one image, which links to a page showing all latest images.
  • image_random: provides a Random Image block.
  • image_gallery: provides all the taxonomy-based image galleries.

To customize any of these views, go admin/build/views, find the view under 'Default Views' and click 'Add' to create your own view to override it. Then:

  • To change what is displayed for each node (eg, remove the title, add more information, etc), change or add fields
  • To change the number of images per gallery, open the Page section and change 'Nodes per Page'.
  • To change the order of images in each gallery, change or add Sort criteria. (If you want to order nodes by hand, several possibilities exist: try the weight module, or adding a CCK field to set order, or creating custom galleries with the nodequeue module.)
  • To change which images are shown in blocks, change or add filters. For example, you may want the Recent Images block to only show images that have been placed in galleries, or from a particular gallery.

You can also create your own views of images. For example, you could create a gallery of images per user, or for another vocabulary. To make an image gallery view, you need the following options, along with any other fields, filters, or sort criteria you like:

  • set the View Type to 'Image: Gallery'
  • add the filter Node: Type is 'Image'.
  • add the field Image: Display Image.

See the Views user documentation for more information on creating and customizing views.

Theming Galleries


Classic galleries

If you don't have Views module installed, or you disable the image gallery view, then you get the old style of gallery. These are hardcoded, and therefore you have fewer options.

The path for the image galleries page is image, and each individual gallery is at image/tid/{n}, where {n} is the term id for that gallery. You can override these paths with the path module.

By default, the image gallery taxonomy has a single hierarchy, allows image nodes to belong to only one gallery, and is not required for image nodes. You can change any of these options for the image gallery vocabulary at the regular taxonomy admin page, admin/content/taxonomy.

Looking for support? Visit the forums, or join #drupal-support in IRC.