After spending *hours* trying to find that perfect php image resize script, and not having any luck at all btw, I stumbled across a blog post by Mike Lopez: PHP Image Resize Script.
Here’s what it does:
- Resize by specified height or width OR by percentage
- Works with both external and onsite images
- Works with JPG, PNG and GIF* (if GD is configured properly)
I think I uploaded, installed, tricked out about 2 dozen scripts last night. Mike’s script beats them all — hands down. Output image quality is very good too, best of the bunch.
The script initially didn’t support GIFs, but Mike was kind enough to work that out for me when I asked for help. Some days it would be so much easier if I was a php guru! lol
Grab the script for yourself, believe me — this one’s a keeper:
Sidenote: You will need to have gif support enabled in your GD config to view GIF files. Here’s how to find that out:
Create a php file (checkphpinfo.php) with this:
Save & Upload
View the file, (ie. http://superaff.com/checkphpinfo.php)
Find the section for gd
You should see GIF Read Support and GIF Create Support enabled. If you don’t have that enabled, check with your host. They may enable it for you.
If you want a way to resize a bunch of offsite images (affiliate products, whatever), this image resize script is just the ticket.
Edit Quick Fix: ooops I meant JPG, PNG and GIF.
Edit Again: updated link at new location (thanks for the update Derrick)