Using the Image module to add an image to a gallery works fine, thumbnail image and full size is created. However, if I later edit the image describtion and save the changes, I get the error message 'Unable to create thumbnail image', and either the full size image is displayed instead of a thumbnail or no image is displayed at all.
The problem is similar to the one reported in http://drupal.org/node/31280, but setting permissions to 777 for files/images doesn't help in my case.
Can you help me?

Mikkel

Comments

jfister’s picture

My problem may not match yours exactly, but I was able to find a solution:

I also had a problem with Image module on Drupal 4.6 saying "Unable to create thumbnail image..." and so on. I changed permissions -- didn't help. I upped the memory in php.ini -- didn't help. I already had libgd properly installed. I dug into the source code and found that the problem was occurring on the resize method. Finally, looking at the source code led me to this method which was failing -- imagecreatefromjpeg.

http://us2.php.net/function.imagecreatefromjpeg

I recompiled PHP using the options "--with-jpeg-dir", "--with-png-dir", "--with-tiff-dir". Then I restarted Apache. Voila -- no more problems with the Image module! Best of luck to everyone!

tnn’s picture

Hi jfister

thanks. your solution works. I recompiled PHP with --with-jpeg-dir=/usr/local and it works now like a champ. BIG thanks.

dkaragiozov’s picture

Have a look at your php.ini file, assuming you had installed packaged version of apache/php - it can be found in /etc/php4/apache2/php.ini for debian/ubuntu or in /etc/php.d/gd.ini on redhat/fedora .

There should be that kind of line

extension=gd.so

which should enable PHP GD library. Restart apache after adding this line.

Good luck,

Diman Karagiozov
Tetracom IS Ltd.
http://www.tetracom.com

havran’s picture

I have similiar problem. I use Drupal 4.7rc3 and actual image and img_assist modules from CVS. All directory permissions are ok, i can upload and save user pictures with no problem. User picture are resized without problem but pictures which i want upload through image assist can not create thumbnail and preview with error report:

    * warning: imagejpeg(): Unable to access files/obrazky/temp/rozhovor2.thumbnail.jpg in /data/web/webspace/02/27/00/0500002702/kope-vas-muza/includes/image.inc on line 300.
    * warning: imagejpeg(): Invalid filename 'files/obrazky/temp/rozhovor2.thumbnail.jpg' in /data/web/webspace/02/27/00/0500002702/kope-vas-muza/includes/image.inc on line 300.
    * Unable to create thumbnail image

Full size image is uploaded ok.

--
My site - Svoji.SK
My first Drupal site - http://www.enigma.sk/

L. Allen Poole’s picture

As my site is hosted by a commercial provider (1and1.com), I can't recompile php or restart apache.

I'm having a similar problem with thumbnail/preview image creation:
http://drupal.org/node/73986

Seems there's a bug in includes/image.inc, but I can't find a solution.

Suggestions are welcome!

L. Allen Poole’s picture

I was having similar symptoms, although perhaps caused by a different problem.

I got ImageMagick installed & working, and my problems went away.
Details here:
http://drupal.org/node/73986#comment-129412

ptilu8’s picture

Same problem here, image.module installed, images upload is ok but error (thumbnail not created).
When I look at my folder, got the original size file and a file with the same (full) size in temp dir...

The size limitation for my users avatars doesn't seem to work, they can upload pictures the size they want.

Seems to be a hosing problem, help needed !!

Greetings

ptilu8’s picture

OK, forget about this...

It works like a charm with jpeg and png... Problem with gif files due to the gd version installed (gif read AND write back since gd 2.0.28, mine is too old so gif read only..)

;)