Added a modified version of imgToThumb for resize images to thumbs with same height.