The Copy method was downloading the file and uploading it again rather than server side copying it. It looks from the docs that the upload process can read a URL so this might be possible, but the removed code is incorrect.
Low level retrying uploads can lead to partial or empty files being uploaded as the io.Reader has been read in the first attempt.
Imagekit doesn't support empty files so return correct error for integration tests to process properly.