Home / Tutorial / How to Use Timthumb Script with Amazon S3

How to Use Timthumb Script with Amazon S3

Timthumb script is a very popular script by Darrenhoyt which allows you to automatically create thumbnails from the images in your articles. The script is very popular among WordPress themes to show thumbnails on the front page. The initial version of the script did not work with images hosted on other domains or CDNs like Amazon S3 etc. While working our new theme, we had the challenge to get the script working for images hosted on Amazon S3.

timthumb

There are two ways to get this script working on Amazon S3 or any other CDN.

1. The new version of the script has an option to add custom domains for fetching the images and also has option to add the URL. Open the script and you can see an option called $allowedSites and you can add your own domains here.

timthumb script

You need to set up a temp folder in the same directory and set it to 777 and the script will work for CDNs or Amazon S3.

2. Second alternative is a modified version of the script created by one of users which allows you use any CDN with this script. You can download the modified script here.

About Nirmal

Nirmal is a Technology Blogger and a Microsoft MVP in Windows. He can be contacted at nirmal@nirmaltv.com. You can find Nirmal on , and .

2 comments

  1. I really like what you blog about here, very insightful and intelligent. One issue though, I’m running Firefox on Ubuntu and some of your site structure are a little off. I realize it’s not a common setup, but it’s still something to keep an eye on. Just giving you a heads up.

  2. Thanks for your help. I’ll try this out.

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>