Change image onChange

I want to find the way how to change the image logo when an image is loaded into from input field
i have found a similar program on codepen.io (https://codepen.io/shantikumarsingh/pen/RRmWxo?editors=1010)

But this is difficult to get it

I hope you guys have a better solution for this
Thank you

You would just need to use an event listener on the input using onload, loading. This you can then use to trigger your DOM to change how you want.