append img to svg d3 js

JavaScript
var myimage = svg.append('image')
    .attr('xlink:href', 'http://lorempixel.com/200/200/')
    .attr('width', 200)
    .attr('height', 200)
Source

Also in JavaScript: