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

          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
    

)->
  converter = new showdown.Converter()

  addImageInCid = (message, type, name, base64, id) ->
    message.cids = (message.cids || []).concat([{type: type, name: name, base64: base64, id: id}])

  renderEmbeddedImages = (message, useCid) -> 
    images = message.body.match(/data:image\/(.*);base64,([^"]*)/gm)

    if images.length > 0
