Added thumbnail generation.