views:

25

answers:

2

Just a quick question:

I'm working on revamping a script that serves vehicle inventory to users. The site receives thousands of hits per month with many pageviews per visitor.

My question is this:

I am going to have 7 images for each vehicle in the new system. 1 Main Product Photo 6 Interior Extra Photos

The 6 extras will be viewed as a thumbnail, with the ability to load the full image in a lightbox.

Now, to the question:

Should I use TimThumb (or similar) to resize the images to Thumbs on the fly, OR should I create a thumb directory and save a thumbnail for each image as it is added to the server?

I use TimThumb for the main image, and it works quite well, but I'm debating which is easier on the server for the other 6 images.

Thanks!

A: 

The easiest on the server is to use javascript on the client side. Its a little slower loading for the user if there are a lot of images being served but if there are less than 10 it should be okay. Look into using jQuery and CJ Object Scaler http://plugins.jquery.com/project/cj_object_scaler

Mike Keller
I understand that that would make sense, unfortunately we're trying to avoid Javascript because it has been problematic with clients not having it. I'm not terribly worried about the server, I just want to know which would be recommended for this use.
gamerzfuse
+1  A: 

it might not differ while the load is low, but rebuilding thumbs on request is quite resuorce consuming. if server load matters, you should save thumbnails.

there are two ways to do this: - generate all thumbs on image upload - generate thumbs on first request and save them

kgb
Alright, that's what I figured. I think I will probably stick with saving thumbs then. I should be able to put the image into the Images folder, and then save the exact same image name to /thumbs/ and have it sized down. Thanks!
gamerzfuse