3
votes

I created an Imagecache setting that just resizes to 125px wide. First issue is that the preview image is 404.

Then I want to print out an image via

<?php print theme('imagecache', 'imported_image', $node->picture, 'test', 'test',  $attributes);  ?>

'imported_image' being the preset and $node->picture is a correct path. The html prints out ok but the path it's trying load the image from does not exist. In sites/default/files/imagecache there is no folder with the name of the preset. Flushing the preset does nothing. The imagecache folder is writeable by everyone. This is on MAMP.

Anyone know what the issue could be?

2
Have you checked the Drupal logs? Imagecache usually leaves some traces there if the creation of a cahce image fails.Henrik Opel
In the Reports I found that Imagecache temp directory was not writeable. I set a directory via Site Config > File System and that fixed the alert but the problem still exists. When I create a new preset, a directory should be created with the same name but this doesn't happen despite the parent dir being writeable ...stef
I know the path is correct cause the Devel Themer feature puts lots of files there ...stef
does the user role you are logged in as have permission to view this imagecache preset?henrikpp
Imagecache does not work when friendly url's are off. If this is the case, it can not 'find' the path to its folder in sites/default/files. When I turned them on, the folder with the name of the setting was created ok. The Imagecached images don't appear in here though. I'm putting it down to switching dev from Win to Mac, as a few people suggested on the Drupal forums. I'm hoping the issue will be fixed when I return back to a Win machine ...stef

2 Answers

5
votes

Imagecache does not work when friendly url's are off. If this is the case, it can not 'find' the path to its folder in sites/default/files. When I turned them on, the folder with the name of the setting was created ok. The Imagecached images don't appear in here though. I'm putting it down to switching dev from Win to Mac, as a few people suggested on the Drupal forums.

posting last comment as an answer for ease in finding

1
votes

Try to enable Lighttpd's "url.rewrite-if-not-file" directive I posted it right here:

http://www.warp1337.com/content/solved-lighttpd-drupal-7-imagecache-images-are-broken-errorhandler404