Creating thumbnails.
-------------------------------------------------