This is the code for Chapter 3, Figure 18 from D3.js in Action showing how to load external images (in this case PNGs) and append them as SVG image elements to g elements.