I’m loving the Woo theme for this blog, and especially love that they integrated the cool TimThumb script to automatically resize thumbnails for the main page. But everything stopped working when I added TanTan’s WordPress-S3 plugin to store my images on Amazon’s servers. Luckily, I found a fix!
The first step was upgrading Woo’s version of TimThumb.php. I downloaded the latest version from Google Code and replaced the thumb.php file in the theme directory (under wp-content/themes).
Next, I had to add Amazon S3 to the “allowedSites” array in thumb.php. I added the following line:
I also had to tell CURL to allow the SSL connection by adding the following line under “$ch = curl_init ($src)”, around line 606:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
Then we need two subdirectories, temp and cache, in the same directory as the plugin. Make sure both are writable with an old “chmod 777”. I found that Woo automatically created the “cache”, but the “temp” was AWOL.
That’s it! Now that I did this mod, TimThumb and WordPress-S3 are playing nicely and all is right with the world. The image above (my own photo) was uploaded and thumbnailed automatically!