repair image references