Chapter 7. Photo Gallery
If a picture says a thousand words, it’s important that a site have a strong foundation for managing images. The flexibility of Drupal allows for the management of images in a variety of ways and can scale from a one-person portfolio to millions of users uploading photos on a fansite.
This chapter introduces the following modules:
- ImageField (http://drupal.org/project/imagefield)
A CCK field that allows image uploads
- ImageCache (http://drupal.org/project/imagecache)
Automatically resizes images to predefined dimensions and caches them for later retrieval
- Custom Pagers (http://drupal.org/project/custom_pagers)
Creates custom previous/next pagers
If you would like to participate in the hands-on exercises in this chapter, install Drupal using the Photo Gallery installation profile from the book’s sample code. This will create the example website on your web server. The completed website will look as pictured in Figure 7-1 and at http://gallery.usingdrupal.com. For more information on using the book’s sample code, see the Preface.
Note
In order to complete this chapter, you must have the Clean URLs feature working, and your version of PHP must have the GD Library installed. See the Troubleshooting ImageCache“ section, later in this chapter, for more information.
Case Study

The Robinsons have a large extended family with whom ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access