move image upgrade into common