only build thumbnail if image