title: Convert base64 string to image
body: <p>I am trying to crop/resize user profile image using jquery plugin namely crop.js which sends user image as base64 via ajax to my controller as </p>
  
  <pre><code>$.ajax({
           type: "post",
           dataType: "json",
           url: "${g.createLink(controller: 'personalDetail', action:'uploadUserImage')}",
           data: { avatar: canvas.toDataURL() }
  
          });
  </code></pre>
  
  <p>but I unable to decode this base64</p>
  
  <pre><code>'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPAAAADwCAYAAAA+VemSAAAgAEl...==' 
  </code></pre>
  
  <p>string as Image,Can you guys guide me how can I save my base64 string as image on my server?.</p>