My Gallery2 Thumbnail Problem

By | December 16, 2009

Gallery2 IconWhen I changed hosting plans with GoDaddy I encountered a few problems with Gallery2. All of the configuration was correct, but when I uploaded a new image the square thumbnail would not appear. I deactivated the Square Thumbnail plugin from Site Admin > Gallery > Plugins, and reactivated it but there was no change.

I attempted to rebuild all thumbnails from Gallery > Maintenance but I received an error message about the last image I uploaded. I figured something was wrong and began the task of troubleshooting.

If I have a problem with Gallery2 there is a good chance the answer can be found in the support forums. The forums were helpful but there was never a ‘catch all’ thread for my problem. Since I have gone through this process twice in eight months I wanted to write the steps I took for future reference and possibly for others if they have a problem when their square thumbnails are no longer being created after a host move.

Getting Started
The Thumbnails / resized images section in the FAQ got me on the path to troubleshooting the Graphic Toolkits. I started off with completely uninstalling ImageMagick, Jpegtran, NetPBM and Gd. At this point I uninstalled the Square Thumbnails plugin; I don’t know if this was necessary to remove the Square Thumbnails plugin but I did not want to take any chances.

Installing ImageMagick, Jpegtran, NetPBM and Gd was easy, but configuring them was where the majority of my time was spent. Gd installs without configuration, but the other three require a bit more attention.

ImageMagick
Fortunately ImageMagick is accessible by a public directory on GoDaddy hosting accounts, so when I had to provide a path for the IM (ImageMagick) binaries all I had to enter was “/usr/local/bin/” and Save Settings.

Gallery2 ImageMagick Settings

Jpegtran
This is where things got a little more difficult for me. There is a /jpegtran folder at “/usr/bin/jpegtran” but that would fail to crop the image when I tested the binary. I also received the error message “Incorrect exit status for jpegtran command”.

I downloaded my own Jpegtran library from the file “jpegtran.tar.gz”, which can be downloaded from here. I extracted the file and uploaded it to a folder inside of my Gallery2 installation. Then I set the folder and its contents to 755 and tested the settings again and this time the crop function passed.

NetPBM
I downloaded a version of the NetPBM file from Sourceforge (the same file is mirrored here). I extracted the files to a folder inside my Gallery2 installation and set the folder and its contents to 755. When I ran the test I had the “Jhead” path empty and had several error messages.

Gallery2 No Jhead Installed

I attempted to install the “Jhead” library with Jhead.gz and jhead-latest.tar.gz but neither appeared to work. When I did this in April 2009 I was not sure if I had “Jhead” installed or not, but I am still able to use NetPBM on MIME types image/jpeg, image/pjpeg, image/gif, image/png and image/tiff so that will meet my requirements for now. If I find the answer for the “Jhead” library path I will update this post.

With ImageMagick, Jpegtran, NetPBM and Gd installed and configured I reinstalled Square Thumbnails and when I re-uploaded the image my previously broken image now appeared.

Leave a Reply

Your email address will not be published. Required fields are marked *