       @context.fill()
       @context.stroke()
       @context.closePath()
+      # draw image
+      if d.img
+        @context.save()
+        @context.clip()
+        @context.drawImage d.imgObj, d.x-d.size, d.y-d.size, 2*d.size, 2*d.size
+        @context.restore()
 
   drawNodesLabels: ->
     # set styles

      @setNodeFill d
      @setNodeStroke d
      @setNodeFont d
      @setNodeLabel d  
    # Reorder nodes data if size is dynamic (in order to add bigger nodes after small ones)
    if @parameters.nodesSize == 1
      @data_nodes.sort @sortNodes

  setNodeFill: (d) ->
    if d.disabled
      d.fill = '#d3d7db'
    else if @parameters.nodesColor == 'qualitative' or @parameters.nodesColor == 'quantitative'
      d.fill = @color_scale d[@parameters.nodesColorColumn] 
    else
      d.fill = @COLOR_SOLID[@parameters.nodesColor]

  setNodeImage: (d) ->
    if @parameters.showNodesImage
      d.img = @getImage d
      if d.img
        d.imgObj = new Image()
        d.imgObj.src = d.img

  setNodeStroke: (d) ->
    if @node_active and d.id == @node_active.id
