Merge "Unify the user image building code"