A couple of weeks ago I posted a brief history of TimThumb, the image resizing script I am responsible for. I said in the conclusion that I was looking for beta testers, and I am, however I have been a bit slack at sending out the script to the people who ask.
So, I thought I would upload it for everyone to download so that we can give it to a wider audience.
Download TimThumb BETA here
Installation
Firstly I would recommend renaming your existing TimThumb script incase something goes horribly wrong. Then download the file linked above and put it in the same location as your current version. So far so normal (although do note I added an 's' to the file extension so be sure to rename to '.php').
After this you will need to create a new folder in the same directory as the cache folder. Currently I am not sure if this will remain or if I should use the cache folder or if I should do something totally different - feedback on this would be welcome. You should name the new folder "temp" and give it folder permissions 777.
What to test?
The main thing I want tested is the offsite image resizing. Currently only flickr.com, picasa.com, blogger.com, and wordpress.com are supported (and I have only tested Flickr myself) but these settings will be configurable in the future.
Feedback
Any and all feedback you can give would be most welcome. Simply post your thoughts in the comments below - and thanks a lot for being so willing to give you time to help improve TimThumb.
106 Responses to “TimThumb beta test” Leave a reply ›
Hi Ben,
Script works very fine on local but when it goes to production an error returns such as "Access to requested resource is denied on this server"
Do you know why that happens?
Hey Mehmet. This is probably to do with directory permissions. Make sure the only directories that are set to 777 are the temp and cache ones. The rest should use the normal settings (644 I think)
Hi Ben,
it looks like this beta version isn't going to resize external URLs with a space in it. I tried find/replace the space with %20 but without any results.
http://www.mydomain.com/...0&w=150&zc=1&q=80A url like above is not working for me and results in PHP errors:
Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecoverable error: in /home/tandenb/domains/mydomain.com/public_html/utils/thumb.php on line 308
Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: '/home/tandenb/domains/mydomain.com/public_html/utils/temp/wenger 50.jpg' is not a valid JPEG file in /home/tandenb/domains/mydomain.com/public_html/utils/thumb.php on line 308
Warning: Cannot modify header information - headers already sent by (output started at /home/tandenb/domains/mydomain.com/public_html/utils/thumb.php:308) in /home/tandenb/domains/mydomain.com/public_html/utils/thumb.php on line 726
Unable to open image : /home/tandenb/domains/mydomain.com/public_html/utils/temp/wenger 50.jpg
Other images do work.
Yours
urls shouldn't have spaces in them, that's bad practice. I would recommend renaming the image and trying again.
I actually did that Ben. Folder structure is scripts, inside the folder scripts there is cache folder and timthumb.php
cache folder is set to 777
scripts folder is set to 755
timthumb.php is set to 644 (default)
I am trying to find the problem since 2-3 days with no luck..
I read between the lines: Mehmet doesn't have a /temp folder!
Create this behind the scripts, beside cache folder as it's needed for the external images.
Hi there,
great work on timthumb, is there any workaround for resizing external images?
hi there,
thank you very much for this code.
I have it enabled in my site,
and I made it to resize external images from all sources.
now I saw that I there's no limit for the thumbs generated,
I just made a w=20.000 & h=15.000 thumb... that's quite scary.
is there a way to limit that?
cheers!
can you please have a look at my side...
obviously it doesn´t work...
I uploaded the new timthumb.php file and tried it out with this pic http://www.tourendatenbank.com/gps/testbild/ - on the main site you can see that there is no thumbnail..
but in the source code you can see that it is still
can you help pls.
thank you.
bergblume
@Ben I'm talking actually about an external/remote domain so I don't have any control over whether there are spaces or not in the filename.
Anyone had any luck getting the new version to draw and resize images from Amazon?
- I have made sure the cache and temp folders are 777.
- I tried adding "amazon.com" to the allowedsites array.
Still wont pull them though.
Anyone have any luck with it?
@Mark I haven't tried to get Amazon to work, but their images are typically hosted at images-amazon.com not amazon.com.
@ Frank -
Thanks for the update on it! I tried that one before with no luck. I think it may be on my server end, as nothing seems to be writing to the temp folder at all.
Tried permissions of both 777 and 755 (Hostgator server) but I may need to dig deeper than just permissions on it, since its coming from an outside domain.
Thanks again,
Mark
Can anybody explain to me how you get this to work as I have copied the code into my timthumb.php on wordpress and changed folder permissions on my host and still just x's where the picture should be.
What else do I need to do to make it work because in every post I read something else but still at a loss as to what steps I need to take next! Do I use the custom CSS in my theme or the "first image" option?
Where is it that I put "allowed sites" as I am seeing alot of talk about that but no instructions!!!
Do I need to further customise the actual timthumb code or should it be ready to go?