react-native-image-gallery icon indicating copy to clipboard operation
react-native-image-gallery copied to clipboard

how to show a base64 image?

Open KennethTavares opened this issue 6 years ago • 6 comments

Does this component support images in the base64 format? In my project this error happened when I downloaded the json string

ReactNativeJS: 'react-native-image-gallery', 'Please provide dimensions of your local images'

thanks a lot!

KennethTavares avatar Jan 24 '19 16:01 KennethTavares

Anybody know?

KennethTavares avatar Jan 25 '19 07:01 KennethTavares

You should use:
{ source: { uri: 'base64 ' }, dimensions: { width: 1920, height: 1080 }, } besides the source you must pass the dimension.

migueldaipre avatar May 11 '19 13:05 migueldaipre

I pass the dimensions and it still gives me this warning and it doesn't upload any image. Does anybody knows why?

An example to one of the images in my array: {source: {url: 'https://lh3.googleusercontent.com/p/AF1QipMJki5Im_7IIwBhRVCzfYkwP7zNdCZm0y9qyK3l=s1600-w400-h250' }, dimensions: { width: 400, height: 250 } }

When I insert the images manually in an array, they are shown. But when I add the images to the array through my fetch method, it displays this warning. Although when I print the content of each array, they are the same.

lamaalqasem avatar Feb 26 '20 14:02 lamaalqasem

I noticed that you are using url instead of uri, change to: { source: { uri: 'https://lh3.googleusercontent.com/p/AF1QipMJki5Im_7IIwBhRVCzfYkwP7zNdCZm0y9qyK3l=s1600-w400-h250 ' }, dimensions: { width: 400, height: 250 }, }

migueldaipre avatar Feb 26 '20 23:02 migueldaipre

I noticed that you are using url instead of uri, change to: { source: { uri: 'https://lh3.googleusercontent.com/p/AF1QipMJki5Im_7IIwBhRVCzfYkwP7zNdCZm0y9qyK3l=s1600-w400-h250 ' }, dimensions: { width: 400, height: 250 }, }

Thank you for your reply. I changed it to "uri" but it is still asking me to provide dimensions.

lamaalqasem avatar Feb 28 '20 12:02 lamaalqasem

anyone solved? i stack here

mertct11 avatar Jul 28 '20 19:07 mertct11