wcandillon / react-native-expo-image-cache

React Native Image Cache and Progressive Loading based on Expo
MIT License
668 stars 125 forks source link

Does uri prop accept base64 encoded string? #153

Open GwFreak01 opened 3 years ago

GwFreak01 commented 3 years ago

As the title states.

The data is

const images = [
     {
          uri: "data:image/jpeg;base64,sadflhasdefkjdhskj2345jfhkj2bdf"
     }
]

I tested my base64 encoded string with react-native's built-in Image component and passed in

<Image style={{width: 300, height: 300}} source={{uri: images[0].uri}} />

and the image gets displayed.

When I try to do

<Image
                style={{width: 300, height: 300}}
                preview={{ uri: images[0].uri }}
                tint="light"
                uri={images[0].uri}
              />

I see the blurred preview of my image, but it doesn't actually render all the way which is very strange.

I think I might be misunderstanding something?

root123-bot commented 1 year ago

Same issue I'm facing