Php image resize/thumbnail approach for (WordPress)

My goal is to create a website for a client that needs the site to be heavily based as image galleries.

I am making the site through WordPress so the client can upload the pictures through the friendly wordpress admin panel and then the site will display a parent image for the gallery and several thumbnails (scrolling with Jquery).

Read More

My question is for advice on good ways to resize the images as thumbnails. Currently I have some “hack-ish” code that simply changes the image dimensions, but as far as I know this doesn’t reduce loading time and is quite inefficient.

Any ides on how to do it better? Possibly by using PHP GD? Thanks!

Related posts

Leave a Reply

3 comments

  1. Timthumb might be a good solution for this. The built-in wordpress media settings can only be set once for three different image options (thumbnail, medium and large). If you change the settings, anything already uploaded won’t be readjusted. Most of the time this is acceptable, but for a photo heavy site, you might need more size options and dynamic adjustments. This simple php script will create any size image and save a cache copy for quick delivery. Lots of WordPress themes use it.

    http://code.google.com/p/timthumb/

    — EDIT —

    So, you know that advice about TimThumb I gave yesterday? Well, check out the big news today. Just make sure you’re using the latest version.

    http://ma.tt/2011/08/the-timthumb-saga/

  2. WordPress his this nifty function tucked away image_resize, I’d recommend that if your looking to do this on the code size in one location. I have a small “library” I wrote to “help” with handling file uploads in WordPress, the git repo is here.