18.10.2016 Views

Drupal 7 Module Development

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 11<br />

This is all very cool, but sometimes it might be nice to pre-create some manipulations<br />

for repeated use, or even a set of manipulations to be executed in order. This is what<br />

Image Styles are for, and we'll look at that now.<br />

Image Styles<br />

Image Styles is the <strong>Drupal</strong> 7 core replacement for the popular Imagecache module,<br />

which has been around since <strong>Drupal</strong> 5. Image Styles is a collection of manipulations<br />

which can be saved as a group to be applied to images. Once saved, these styles can<br />

be easily used as formatters for Image fields, or they can be used in code by calling<br />

a theme function as we did above with our hand-crafted images.<br />

[ 331 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!