add replaceImageToAttached