Updated rename image method