replace self link from mimetype