implements image drag and drop