This is the code for Chapter 8, Figure 8 from D3.js in Action showing how to draw multiple images with HTML5 Canvas and pass those using .toDataUrl to an image array, and then using that array and D3 data-binding to create a hundred img elements.
https://d3js.org/colorbrewer.v1.min.js
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js