Drupal Nightmare #1: Imagecache not generating thumbs

May 11th, 2011 | By | Category: Internet, Technology

Holy good god almight this was a nightmare, the biggest problem i’ve had with drupal to date, a 13 hour marathon just to figure this beast out.. ugh..

So if you’re having troubles with Imagecache not properly generating thumbnails for you, it keeps on referring to directories like files/imagecache/presetName/ that dont’ exist then you might be going through what I went through.. Firstly you’re going to want to read through all the million support issue tickets on this over at drupal.org because this seems to be the most common drupal problem yet, going back 3 years or so and there are 1 million reasons for it to happen apparently and 2 million possible solutions.  Well this is one solution that I didn’t see anywhere and is another fine example of the rarity of the problems I craft up over here.

Here’s my final post on one of the issue posts:

Alright!!! Problem solved over here!!

It turned out that my nginx configuration was taking images and movies and having them bypass apache and go through nginx. This caused them to ignore all .htaccess rules including the ones set out in drupals root dir which caused imagecache to royally mess up.

I’ve never seen anyone mention nginx in relation to this issue so hopefully this answers some questions for those of you who are stumped.

Incase you are doign this yourself, go into your nginx.conf file, find your domain in question and see if there’s a line like this:

location ~* ^.+.(jpg|gif|ico|css|js|png|flv|wmv|mpg)$ {

If there is you need to take out anything you are going to be making thumbnails with imagecache for, png, jpg and gif should probably do it but take out the whole section if you really want

Restart nginx and you’re off to the races.. After 13 hours of deadends I can’t believe this nightmare is over

Tags: , , ,

2 Comments to “Drupal Nightmare #1: Imagecache not generating thumbs”

  1. Eric says:

    You’re a lifesaver! I was in the same boat. NO ONE else mentioned to look at the line ignoring the image 404s.

  2. Anton says:

    Yeah, it was very helpfull ! Lifesaver indeed.

Leave a Comment