updated image copy function to push in version and simplify the interface