Rewrite the image upload and split into 2 steps