title: Convert image from url to Base64
body: <p>Using an Image File, I am getting the url of an image, that needs be to send to a webservice. From there the image has to be saved locally on my system. </p>
  
  <p>The code I am using:</p>
  
  <pre><code>var imagepath = $("#imageid").val();// from this getting the path of the selected image
  
  that var st = imagepath.replace(data:image/png or jpg; base64"/"");
  </code></pre>
  
  <p>How to convert the image url to BASE64?</p>