ID:276775
 
So for one of my classes, we're creating websites. Our issue right now is thumbnails. We decided to use one picture, rather than having two versions of a picture for EACH product. What are your thoughts on this? Our teacher is pretty much idiotic at this point, saying what we did was absolutely wrong.
The big problem is that you might have big main images, you want to use thumbnails to reduce the size of the load on the server and decreasing loading times.
In response to Scoobert
Yes yes I understand this. We are using thumbnails, it's just my teacher and I are disagreeing on them.

My view: Using one picture for the thumbnail is perfectly fine. This way you don't have any unneeded picture files floating around. I simply add the picture to the page, change it's length and width to be much smaller than normal, and link it to the original picture. This way only one picture is needed.

Teacher's view: Having two images. One for the actual thumbnail, and one that is of the actual size to link to.


I just don't understand how he can tell me my way of doing it is wrong, when I personally think it's much more efficient and space saving.
In response to SSJ Radditz
As Scoobert implied, your way is less efficient because every page view must load the larger, full size images. This means more data transferred over the network, longer load times, and more work for the browser to scale the images to thumbnail size. And generally, most browsers do a much poorer job of scaling down images than a decent image editor, so they look worse too. I have to agree with your teacher.
In response to SSJ Radditz
SSJ Radditz wrote:
I just don't understand how he can tell me my way of doing it is wrong, when I personally think it's much more efficient and space saving.

space-saving, maybe, but efficient? nope.

it's much faster for a browser to render a pre-scaled thumbnail than to use HTML to re-scale a full size image on the fly. and for webpages where you have lots of images to preview (like a gallery or catalog), proper thumbnails will win hands down.

your teacher is right this time.

one method where you could get away with a single image is if you used PHP's GD library of functions to generate re-scaled jpegs or pngs of your original images 'on-the-fly' - of course this is still slower than using pre-rendered thumbnails, and the quality of the generated thumbnail may still be worse than if you did it with a program like Photoshop or GIMP.
In response to digitalmouse
digitalmouse wrote:
one method where you could get away with a single image is if you used PHP's GD library of functions to generate re-scaled jpegs or pngs of your original images 'on-the-fly' - of course this is still slower than using pre-rendered thumbnails, and the quality of the generated thumbnail may still be worse than if you did it with a program like Photoshop or GIMP.

You can mitigate the speed problem somewhat by caching the thumbnail images so you don't have to keep regenerating them, but in general I'd also have to agree with your teacher, Radditz. Separate thumbnail images are the only way to go, whether you generate them automatically or not.
In response to Crispy
http://www.irfanview.com/

This is a great tool for batch thumbnails. Set some basic settings and next thing you know, your 20 pictures that would have taken 2+ minutes a peice 2 seconds a peice. And it is FREE.

My brother uses it for all is quick and basic image modification (Cropping, rotating, thumbnailing).