Add thumbnail function.