I've had some trouble with imagecache not working during node preview using the CCK imagefield, because the images were being stored in the /tmp directory. Imagecache implode()s the file path from the argument string, losing the '/' at the start. The attached patch fixed this problem for me.

CommentFileSizeAuthor
check_for_beginning_slash.patch746 bytesRob Knight

Comments

dopry’s picture

Status: Needs review » Postponed (maintainer needs more info)

and can you tell me why you want ImageCache serving images from your tmp directory?

dopry’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Ok so sorry... this is more of a by design thing... don't use absolute paths to imagecache source images... they need to be either relative to the file directory path or the root of the drupal installation...

This is a security issue... I'm sure you dont' want me grabbing images from other websites on your server or your users home directory...