Dyanmic Image Resizing

I use timthumb for dynamic image resizing. It works on most webhosts and requires little to no setting up. All you have to do is upload the file to your website and link to it like so:

<img src="//timthumb.php?src=/images/whatever.jpg&amp;h=150&amp;w=150&amp;zc=1" alt="" />

And you can adjust the height, the width and the quality of the image resized. The above code will make the image 150 pixles wide and 150 pixels width with no cropping of the image.

If you wanted the image to be resized to anything else you just change those settings. You can see timthumb in use heavily at My Name is Casey and Studio Number One.

About Weston Deboer

I like to use wordpress for any and every website that I work on. No matter how big or how small the website is.
This entry was posted in PHP and tagged , , , . Bookmark the permalink.

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>