Closed BilawalSh closed 3 months ago
I can to try fix!
What version are you using, and are you on react or next?
In fact, I think I already discovered the error, you are passing a url to the src, the src is for images in base64, it does not accept images in url
That is not an error, the package allows to load a image as url or as base64. For its internal behavio0r it always try to parse and convert images into base64, on init
Look this example:
here i initialize the state with this wikipedia image, then it is passed as prop to the component:
Pick and edit an image:
< ReactImagePickerEditor
imageSrcProp={logo as any}
config={config2}
imageChanged={(newDataUri: any) => { setImageSrc2(newDataUri) }} />
</div>
then the result:
Thank you for your quick reply, @josealejandro2928 @Lucas-Jav This is fresh project Here is the simplest Script:
Output (Error)
Package.json
what is wrong in this code
That's exactly what I imagined, this error is occurring because this image is in "url" format, and in its lib it uses base64 in the src, because in base64 format it can edit it better. I recommend passing the image to base64. But in a future feature we will create the possibility of accepting urls as well.
website to convert the image: https://base64.guru/converter/encode/image
Or we also recommend downloading the image and doing this:
Thank you for confirmation
I think i can close this
Hello @josealejandro2928 @Lucas-Jav I have found this issue when we pass the image URL it shows an error
I try many ways but still get this error on all images url.
Can you fix it?