react-native-image-resizer
react-native-image-resizer copied to clipboard
Unable to load source image from path in Android
ImageResizer.createResizedImage(Platform.OS == 'IOS'?result.pathName:"file://"+result.pathName,200,110,"PNG",0)
"file://"+result.pathName => file:///storage/emulated/0/saved_signature/signature.png
error:Unable to load source image from path
@zSergeant did you find the solution? I'm running into the same error. thx!
Found the answer in an other issue, you have to use the base 64 of the image :
const uri64 = await toBase64(uri); const image = 'data:image/jpeg;base64,' + uri64; ImageResizer.createResizedImage(image, newWidth, newHeight, 'JPEG', 100).then()
Facing the same issue, Are you able to solve this issue? @zSergeant Any update on this? @PierreCapo @robertbarclay @JimTeva
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed. Thank you for your contributions.
We have 8k users on Pl@ntNet app having this issue on the last 2 weeks. We are not using the version 3 of the library though.
An advice which worked in my case : try to read the file with fs.readFile(...) just before resizing. If readFile return an error you got your issue, your file don't exist
@HugoGresse Did you find any work around?