test if there is a thumbnail before linking