The best way, in my opinion is to use a batch image optimization program with a 'fit to box' resize option. I notice that your images seem to be rather large in byte size and low in resolution. If you were to start with the original images (assuming that you have them and that they are of a higher resolution), this would result in much less band width being used and in a better looking set of images. Even if you don't have the originals, or if these are the originals, their apparent resolution could still be improved and both their physical dimensions and byte load (band width) reduced using this method.
However, it has been my experience with some folks asking this type of question that they don't get how much better that would be, and/or couldn't be bothered.
You can still have the script/browser resize the images, though this will not reduce the band width and in some browsers will make the images of an even poorer looking quality. Some ways to do so - Find this line in the script:
Code:
var imageHTML='<img src="'+imagepath+'" style="border-width: 0" />' //Construct HTML for enlarged image
and add your dimensions there:
Code:
var imageHTML='<img src="'+imagepath+'" width="400" height="300" style="border-width: 0" />' //Construct HTML for enlarged image
Or:
Code:
var imageHTML='<img src="'+imagepath+'" style="width:400px;border-width: 0" />' //Construct HTML for enlarged image
Using the second method, the height will scale proportionately in most browsers, though some browsers will still distort the image even if they get the proportions right.
Bookmarks