title: Crop Image using Javascript (Croppie)
body: <p>I am trying to crop an image to cicle using the <a href="https://github.com/Foliotek/Croppie/blob/master/index.html" rel="nofollow" title="Croppie Library">Croppie Library</a></p>
  
  <p>I have tried to use their functions to return base64 encoded image.
  And it return a base64 code but without the image:
  Here is my code:</p>
  
  <pre><code>&lt;div id="vanilla-demo"&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;img id="myImage" src=""&gt;
  
  &lt;script src="https://code.jquery.com/jquery-2.1.4.js"&gt;&lt;/script&gt;
  &lt;script src="croppie.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
  
  
          var vanilla = new Croppie(document.getElementById('vanilla-demo'), {
              viewport: { width: 200, height: 200 , type:'circle'},
              boundary: { width: 400, height: 400 },
              showZoom: false
          });
          vanilla.bind('dac.jpg');
              vanilla.result('canvas','original').then(function (src) {
                      console.log(src);
                      $('#myImage').attr('src', src);
              });
  
  &lt;/script&gt;
  </code></pre>