Dealing with images
There is a
lot of discussion going on on how to deal with images in drupal. Most user who are new to drupal will discover the
Image module first and think this is
THE image module for drupal because of it's name. And it works too.
After a while you are getting in touch with the
Content Construction Kit (CCK). And you will discover that there is another, more seminal approach to deal with images: the
ImageField module. ImageField is simply a custom field type for CCK used to store images.
Lullabot features a nice although slightly outdated
blogpost about the pros and cons of these two approaches. In
podcast No. 38 they claim that image module should be deprecated and ImageField should be used instead. That turned the balance for me to finally switch to CCK and ImageField .
So what had to be done? To install ImageField, you have to
resolve some nested dependencies.
- Install and enable the CCK module. This will be core in Drupal 7, so be sure to get comfortable with it.
- Install and enable the ImageAPI module. This module is required by ImageCache and provides an alternative image API. It must be enable before going on!
- Install and enable ImageCache. This module provides image processing functionality like generating derivatives and thumbnails of images.
- Install and enable MimeDetect. This is not required, but highly recommended in combination with the FileField module.
- Install and enable FileField. ImageField depends on FileField, so ... just do it.
- Finally install and enable ImageField.
Finally you have installed everything. But there is still more work to do. A new content type must be generated which makes use of the image field. I'm not done with that, so at this point I have to say ...
to be continued. Meanwhile you could take a look at
this nice video about Imagecache + Imagefield at
drupaltherapy.com on how to go on.
(Note: If you have - like me - used the image module first before switching to ImageField you have to migrate your image without crashing your existing posts. Well, that is not simple. I haven't tried it yet, but I guess this
How-To is a good starting point.)