Added thumbnail generation