adds link references to images