lazy and simple generation of thumbnails