Image change/upload via code

I am trying to change an uploaded image (clickOn) via code but failed to find any code right now. Please if anyone had similar problem and found solution, kindly help me out. I don’t want to upload image via traditional button given.

Why don’t use the original upload button? (You can even make changes with the uploadButton API)

Any reasons so we can figure out alternative solutions?