       message.body = message.body.replace '{bdc}', "<img src='#{src}' />"
 
       if useCid
-        message.cids = [{
-          type: 'image/png'
-          name: 'BDC'
-          base64: bdcBase64.split(',')[1]
-          id: 'bdc'
-        }]
-      renderImages(message, useCid)
+        addImageInCid(message, 'image/png','BDC', bdcBase64.split(',')[1], 'bdc')
       return message
+  
+  renderImages = (message, svg, useCid) -> 
+    renderEmbeddedImages(message, useCid)
+    renderBDC(message, svg, useCid)
 
   renderTo = (project) ->
     emails = (member.email for member in project.team when member.daily is 'to')

          message.body = message.body.replace(imageBase64, "#{src}")

          if useCid
            message.cids = (message.cids || []).concat([{
              type: "image/#{imageType}"
              name: "Image #{imageIdx}"
              base64: imageBase64.split(',')[1]
              id: "image#{imageIdx}"
            }])

    return message
    

      , svg, false
  buildCid: ->
    dynamicFieldsPromise.then (builtDict) ->
      renderImages(prebuildMessage, _svg, true)
