How to catch svg image fail to load in D3?
<p>I am using D3 to create a visualization with rows of <code>&lt;image&gt;</code> svg elements.</p>

<p>Could anyone know how I can upload a replacement image if the image file is not available?</p>

<pre><code>    var images= imageGroup.append('svg:image')
           .attr("xlink:href",function(d,i){
                       //lines of code to process filename
                 return "/img/" + filename + ".jpg"

           })
</code></pre>