i've gotten around this by naming my images with sequential numbers. then you can just have a constant you change that holds the number of the largest image and you can use that to construct your loop ...
Lots of high-res images can really spruce up a Web site. But they can also slow it down-- images are files, files use bandwidth, and bandwidth is directly related to wait times. It's time you get ...