0
I have the following image:
<img id="preview" class="cropped rounded-circle align-center animated fadeIn" width="220px" height="220px">
I need to pass it to a function that will convert to base 64, but to convert to base 64, my image must be in blob before: What I tried to:
handleCropSelect(){
var file = document.getElementById("preview")
var reader = new FileReader();
reader.onload = this._handleReaderLoaded.bind(this);
reader.readAsBinaryString(file);
}
What I get:
Argument of type 'Htmlelement' is not Assignable to Parameter of type 'Blob'. Property 'size' is Missing in type 'Htmlelement'.