Make a thumbnail function for badges.