Adding thumbnails to template