Building a site to handle images in Drupal

There are essentially two different ways to handle images in Drupal. The first way is to use the following modules:

  • image, to define the image content type.
  • a custom module to add extra metadata fields to image nodes.
  • image exact sizes, to resize images when they're uploaded to create two new sizes: thumbnail and preview, and add links to view each size as well as the original. A simple patch to image.module also adds a link to download the original image.
  • image_gallery (part of image), which allows images to be organised into predefined galleries when they're uploaded.
  • image_import, to batch import images.
  • tagadelic, with added quick tags, to allow images to be browsed and tagged/categorised by any user.
  • views, to display image nodes filtered by user or tags.

The second approach is to use these modules:

  • CCK to define a new content type (content_image) and to add custom fields for metadata.
  • imagefield, to add an image field to content_image nodes.
  • imagecache, which resizes images on-the-fly to a variety of predefined sizes, when needed for display.
  • views and tagadelic again (see above).

The CCK approach would seem to be better as it provides integration with Views, allowing image nodes to be filtered and sorted using the metadata fields. CCK also allows the metadata fields to be administered using the admin interface, whereas my custom module has the extra fields hard-coded. However, the modules image_extra and image_gallery, which provide a lot of useful functions, only work with image nodes, not custom content_image nodes created using CCK.

I can't see a way out of this dilemma at the moment, so ended up using the first, non-CCK-based approach. I'm still worried, though, that this is going to lead to a lot of metadata trapped in not particularly accessible fields, reducing the usefulness of an accumulated database of images.

Comments

Hi There,
Just Spotted this.
I too has the quandry, and I decied to sit on the fence, and have some of each approach.
I used CCK, but instead of imagefield, I use textareas with the img_assist module.
Works great for me, may or may not suit you.
Alan

Posted by: Alan on September 18, 2006 4:49 PM

Thanks for breaking this down, looks like a lot of us are in this boat.

One functionailty that I dont see mentioned above is having "user albums" as well as shared, group albums. I'd like users to have their own albums where they can add subalbums as needed, and control who has access to their images. Have you seen anything that can deal with this (besides Gallery2 which I'm finding not very well integrated into Drupal).

Thanks again and please keep us updated on your experience. It's hard to demo all the possible combinations!
~m

Michele: you could use Views to create a view of all the images posted by a particular user, and arguments to filter those by tags, but I don't know a way to have the full image gallery features available for each user separately.

All fields are optional, email address will not be shown; no HTML, URLs are automatically hyperlinked.