Tuesday, February 9, 2010

Weirdness with ImageCache in Drupal

So I was just helping a friend set up a site for a 501c he is doing, and i decided to do it in drupal. Images will play a big part, so I set up a gallery using CCK, Imagecache, and lightbox. Within Imagecache, I setup 2 configuration: a small 100 x 100 scaled and cropped square for thumbnails which - when clicked - open up a zoom preset in a lightbox window. I had set my zoom preset to have a widht and height of 680px, with the understanding that the image would be resized so that the long edge was 680px, but the picture maintained aspect ratio.

This was all fine and dandy for most images, but for a collection of images, the zoom preset just did not get produced. I would pop up the image and get a little error image not found logo in my pop up. The strange thing is that the original image was viewable in the node, and all of the other presets were working. I flushed imagecache a coupla times, which resulted in one of the 4 problem images resolving. Weird.

Ultimately, I found that by limiting ONLY the width and leaving the height blank in the imagecache preset, I was able to get everything working. Unfortunately, that doesn't really solve the mystery.

http://rwwr.org

No comments: