Remove not related code
The code to save and restore the image path was deleted because it was
not used anymore, as refered in the a66f526a48525b675aa1b7489beb48757fcf7768 commit