I used the uploaded image as background image of a div, then moved the background position according to the move drag. The initial position is set to "0px 0px".
Written in pure JS, You probably can make it shorter if you choose to use a JS library that handles the drag.
Example here