adding thumbnails to galleries