How to keep image at the back of the canvas when moving elements with fabric.js?
<p>I have a large image loaded initially into my canvas, and then I would like to be able to draw rectangles over it. When I drag the image around, I still want the rectangles to appear over the image, instead of them being pushed to the back.</p>

<p>Here is a plunk;</p>

<p><a href="http://plnkr.co/edit/iJV0bZrlCG4CJXlhDw8w?p=preview" rel="noreferrer">http://plnkr.co/edit/iJV0bZrlCG4CJXlhDw8w?p=preview</a></p>

<p>If possible, I would like to be able to ensure that no matter what, the image is always at the back? I've looked around quite extensivley, and cannot find a solution. It is becoming increasingly frustrating!</p>

<p>Initially I thought it would be as simple as this;</p>

<pre><code>canvas.on('object:moving', function(e) {

  var obj = e.target;
  console.log(obj.id)
  if (obj.id === 'img') {
    canvas.sendToBack(obj)
  } else {
    canvas.bringToFront(obj)
  }


});
</code></pre>

<p>Hope someone can help!</p>