Generate thumbnails for image documents.