Generated 'thumbnails' are produced with <img /> tag with given height and width, but that doesn't influence actual size of produced images that leads to long loading of gallery in case there are lots of big images.
This can be solved by on-fly thumbnails generation with PIL(falling back to original image size in case PIL is absent). I have created branch for this purpose: rspivak-imagegallery-branch.
Some logic will be added to new Image class. The trickiest part seems to be migration of class names in ZODB, as currently objects with portal type 'Image' are instances of Products.CPSDocument.CPSDocument.CPSDocument class.