Book Image

Drupal Multimedia

Book Image

Drupal Multimedia

Overview of this book

Table of Contents (16 chapters)

Resizing and Cropping


You've probably noticed by now a limitation of the Image Field that images can't be resized as easily as they can be with the Image module. You can set a maximum image resolution, but what about multiple image sizes? Such a simple feature, you think?

Not to worry. The ImageCache module comes to our rescue. It allows not only resizing, but also scaling and cropping, or any combination of these actions. In addition, there is no limit to the number of image size rules that can be created.

So images only need to be resized and/or cropped once. Images dynamically created by the module are cached in the /files directory, hence the module's name. Of course, the Image module does this as well. The main difference is the options that may be applied and, more importantly, that they may be applied to any image type in the file system, whether to Image nodes, attached images, or Image Fields.

To demonstrate how to use this module, we'll take the case of Fishtopia, an imaginary encyclopedia...