Update image logic