make link to legend img agnostic