refactor image add process