react native image picker sending uri string code example

Example 1: display image base64 in REACT NATIVE

const encodedBase64 = 'R0lGODlhAQABAIAAAAAA...7';
<Image source={{uri: `data:image/gif;base64,${encodedBase64}`}} />

Example 2: react native preload local images

import { Image } from 'react-native';
import FastImage from 'react-native-fast-image';

export function preloadImages() {
  const images = [
    require('../assets/images/graphic1.webp'),
    require('../assets/images/graphic2.jpg'),
    require('../assets/images/graphic3.webp')
  ];

  const uris = images.map(image => ({
    uri: Image.resolveAssetSource(image).uri
  }));

  FastImage.preload(uris);
}