Updated scripts for generating thumbnails