Added image processing to include thumbnails