4 replies [Last post]
spidersilk's picture
Offline
Joined: 07/20/2009
Juice: 14
Was this information Helpful?

I hesitate to post this, because from what I've seen a lot of people are having issues with imagecache and none of the posts I've seen have included anything resembling a solution (the only reply most of them seem to have gotten is a rant about how imagecache sucks, ubercart sucks, and/or attempting any form of e-commerce with Drupal sucks, none of which is very helpful).

But I'm working on a store (using Ubercart 5.x-1.7 - hopefully the site will be upgraded to Drupal 6 before too long, but one thing at a time) and finding that product images that I upload are not showing up. I tried to check the folder /files/imagecache/product/ where the images are apparently supposed to be, and it doesn't exist - the imagecache folder exists, but is completely empty. So imagecache does not appear to be creating folders, or images, or generating any kind of error message I can find.

I checked Imagecache's settings and they seem to be correct as far as I can tell - all the required presets are there. It just doesn't seem to be doing anything.

I suppose in the meantime I can just make the images part of the node body using image_assist or something, and use CSS to hide the broken product images, but that's really not a very elegant solution.

Does anyone have any suggestions as to how I can solve this problem, or even just additional troubleshooting steps I could try?

And please, don't just respond with a "_______ sucks!" rant, because that doesn't solve anything.

jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 584
Re: Uploaded images not showing up - imagecache problem?

double check your system file path settings (Site Configuration > File System). Particularly the temp directory path. I usually find ImageCache doesn't work if that setting is wrong. Also - make sure you have set permissions on the imagecache directories to 777 - otherwise it can't create or write to the folders in /sites/default/files/

spidersilk's picture
Offline
Joined: 07/20/2009
Juice: 14
Thanks for the reply! I

Thanks for the reply!

I checked both - file permissions on imagecache were fine, and the temporary directory was set to /tmp, which I think is some kind of default, because I don't remember entering that. I created a new directory at files/tmp, set it to 777, and changed the temporary to that, and then tried re-uploading the image. Still no luck.

Also, the image does not show any preview while uploading. Interestingly, on the product edit screen, I can see the product image (checking properties shows it's in the files directory), but after clicking the view tab to view the node, it doesn't show, because then it's looking for it in the imagecache directory, and it's not there.

I did note, BTW, that the files directory was simply at /files, not /sites/default/files. This may be because the site was originally done in Drupal 4.7 and maybe that was the norm then? Honestly, it's been so long I can't remember. Anyway, I tried changing it to /sites/default/files, copying all the existing content from the original files folder in there, and making sure the imagecache and tmp files were both in there and set to 777, and uploading the image again - still nothing.

So... any other ideas?

jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 584
Re: Thanks for the reply! I

if you're on a Unix box then /tmp should be fine. If it can't locate either the the tmp folder or the files directory it turns it red and throws an error. The Drupal 4.7 thing might be the problem - normally if ImageCache isn't working it's either permissions or it can't find the temp folder it uses to create the image. Have a look at the issues section of the ImageCache module on Drupal.org. It's a v. popular module so there are a lot of issues (nearly 900) but I'm sure there are a lot there dealing with similar issues you are experiencing:

http://drupal.org/project/issues/imagecache?text=&status=All&priorities=...

Giley's picture
Offline
Joined: 07/02/2011
Juice: 3
Images not showing?

Hi All,
A lot of people (including myself) have been uploading websites and then not seeing the uploaded images. Sometimes you only get a placeholder or a box with a red cross or maybe just the Alt name. If this sounds like your problem this is how I fixed it.
In your FTP program go to Transfer > Transfer Type and check the type is set to AUTO and not ASCII.

Upload all files and folders needed for the site and refresh your web page, et Voila.

Well it worked for me so it must work for others.

Good luck.