react-image-cropper
react-image-cropper copied to clipboard
onImgLoad called before beforeImgLoad when using base64 image data
The onImgLoad event triggers before beforeImgLoad when the src is set to base64 data. The is probably due to the data already present in memory and firing asynchronously.
Having this issue as well, I used this hack for the time being
handleImageLoad() {
setTimeout(() => {
this.avatar.src = this.cropper.crop();
}, 100);
}
@FabriceReynolds @du5rte yes, base64 data is already present but beforeImgLoad is fired when component mounted