code: function convertImageToBase64(image) {
    let fileReader = new FileReader();
  
    return new Promise( (resolve, reject) => {
  
      fileReader.onload = fileLoadedEvent => resolve(fileLoadedEvent.target.result);
  
      fileReader.readAsDataURL(image);
  
    });
  }
docs: Gets image height and width in pixels.
  @param {file} image Image file as a blob.
  @returns {string} Base64 image string.