views:

3690

answers:

3

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?

+4  A: 

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

Jeremy French
well one issue is that if you create an invalid imagecache setting (like supplying only one of two required dimensions), imagecache won't work but there is no validation to tell you you have configged it wrong. Would not be a bad idea to add this in the module.That was the problem ...
stef
ahh. you need TWO dimensions for the resize. yes, that seems to be the problem for me as well.
Douglas
A: 

yep :) thank you very much.

iLico
A: 

I am in the process of switching from a Windows IIS host to Unix/apache so I have 2 environments to test on. My Windows host (using the Helm control panel) has URL Rewriting via Helicon Tech ISAPI_Rewrite v3. This allows Clean URLs but ImageCache does not create folders or files - the sample file does not even work. I have tested the same module versions on by Unix host and it works fine, so there is definitely something about the hosting environment that is blocking ImageCache.

Any Windows / IIS users who try getting ImageCache working may well end up with a lot of work and get nowhere.

Tony

related questions