PHP Image Resize Script

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:

PHP Image Resize Script

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.

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.

Thanks Mike!

Edit Quick Fix: ooops I meant JPG, PNG and GIF.

Edit Again: updated link at new location (thanks for the update Derrick)


I've been trying to find my way online for more years than I care to admit.

6 thoughts to “PHP Image Resize Script”

  1. Hey there!

    This seems to be a good one. I’ll try it!

    By the way, do you know how to calculate proportional sizes to create image thumbnails?

    Thanks !


  2. hello, i wonder does it also make the file size of the picture smaller too? for example if i add a 800X600 picture with 500 kb and use this script to make the picture 200X15 will the size of 500kb will be about 100kb?

  3. Not sure I understand clearly, but if you upload a 500kb pic and then use the image resizer to make it smaller, the file sitting on the server is still going to be 500kb–because that’s its actual size. The image resizer just changes the display size, not the file size. Is that what you wanted to know Yusuf?

Comments are closed.