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.


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.