Let's set up a few presets to scale down the images: the first one a "thumbnail" size that's a small 120-pixel-wide square, and the second a "preview" size that maxes out the image for display on photo node pages (which maxes out the image widths at 480 pixels to prevent our layout from breaking):
1. Go to the ImageCache settings page at AdministersSite buildingsImageCache (admin/build/imagecache). Click the "Add new preset" tab.
2. Enter the preset name "thumbnail" in the "Preset namespace" field and click the Create New Preset button. This will take you to the preset configuration screen pictured in Figure 7-20.
3. On the next page, configure the thumbnail preset. In the New Actions fieldset, click Add Scale and Crop. Enter the values from Table 7-8 and shown in Figure 7-21 for the scale and crop action, to create image thumbnails as 120-pixel-wide squares. Click Add Action when finished.
Table 7-8. Settings for the "thumbnail" scale and crop action
4. That completes the configuration of the thumbnail preset. Return to the main ImageCache page at AdministersSite buildingsImageCache (admin/build/ imagecache) and click the "Add new preset" tab. Enter "preview" into the Preset Namespace text field and click the Create New Preset button.
5. In the new preview preset, click the Add Scale link from the New Actions fieldset. Use the values in Table 7-9 for the scale action, to limit preview images to a maximum of 480 pixels wide. Click Add Action after finishing the values from the table.
Table 7-9. Settings for the "preview" scale action Setting Value
Height Leave blank
Now our two presets are complete! We've set up two presets, the first one "thumbnail" for use in listing of many images, and the other "preview" for the display of the image on the photo node page.
Was this article helpful?