added thumbnail generation to image table