Tenho a seguinte imagem:
<img id="preview" class="cropped rounded-circle align-center animated fadeIn" width="220px" height="220px">
Preciso passar ela para uma função que vai converter em base 64, mas para converter para base 64, minha imagem deve estar em blob antes: O que eu tentei:
handleCropSelect(){
var file = document.getElementById("preview")
var reader = new FileReader();
reader.onload = this._handleReaderLoaded.bind(this);
reader.readAsBinaryString(file);
}
O que eu recebo:
Argument of type 'HTMLElement' is not assignable to parameter of type 'Blob'. Property 'size' is missing in type 'HTMLElement'.