I installed the newest version of imagecache. I set up a preset with the extension 'files'. Set it to scale. Updated the action. Update preset and then flushed images. Also, after the install I checked with the directory 'files' and couldn't find that imagecache created any directories inside that folder so I created them myself and set the permissions on directories to 0777.
Next I created some article pages through CCK, imagefield and contemplates. In the teaser I used the code
<?php foreach((array)$field_article_image as $item){
print '<a href="'.$item['filepath'].'"><img src="/test_site/files/imagecache/'.$item['filepath']. '"></a>';}?>
I then began creating articles. The thumbnails are not appearing. I click for the properties of the missing image and it shows up http://www.chibabeat.com/test_site/files/imagecache/files/plumeriasand.jpg which would be the correct url of the image if it were in that folder. The thing is that when I create nodes thumbnail images are not going into the directory i specified. Actually, nothing is in the directory.
My .htaccess file for the 'files' directory looks like the following
# ** Originaly set by Drupal
#SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
# Options None
# <IfModule mod_rewrite.c>
# RewriteEngine off
# </IfModule>
# Modified for use with imagecache.module
Options +FollowSymlinksI can't figure out what I am doing wrong. Note though, I'm not using phptemplate engine and am running on a standard version of spreadfirefox theme. I saw something in the readme about adding
print theme('imagecache', $preset_namespace, $image['filepath']), but I figured this was meant to be in phptemplate engine so I have never fooled around with this code. Does anyone have any idea what I have done wrong? You can see where I am trying to get the pictures to display at http://chibabeat.com/test_site/frontpage
Comments
Comment #1
RobRoy commentedTry this instead:
Or, loop through the array like that. Basically your missing the preset_name in the URL:
<img src="/test_site/files/imagecache/preset_name/'.$item['filepath']. '">Comment #2
dopry commentedyeah you should be using testsite/files/imagecache/files/filepath you need the preset namespace to follow imagecache for it to work.
Comment #3
(not verified) commented