I have the code that moves images in SVG with the mouse. When I move the image, as soon as it is released, I want your clone to appear in the position the first one started and that it is also possible to move it. I have an example here, with the clone code that does not work for me:
var newimage = document.getElementById('img').cloneNode(true);
Example: link