Google it! / Yahoo it! / Bing it! / Ask it!

I’m helping a friend build a CMS for a site and I needed some automatic image resizing. The only possibility was GD so I decided to use it. There are many tutorials out there teaching you how to do it, but I wrote my own function from several GD functions available and some help.

Here is the function: [download]

And here is the caller. Remember to set the path right, both in the function and in the caller.

<?php echo '<a href="image.jpg"><img src="" alt="" /></a>'; ?>

That’s all.

One Response to PHP GD Thumbnails

  • I was looking something like this. I going to give it a try but I don’t know if I will be able to implement it by myself.
    Thank you.


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>