copy tags when replacing image