Using React Native 0.41 (in March 2017), targeting iOS, I just found it as easy as:

<Image source={require('./myimage.png')} />

The image file must exist in the same folder as the .js file requiring it for "./" to work.

I didn't have to change anything in the XCode project. It just worked.

Note that the path seems to have to start with "./" or "../" and be full lower case. I'm not sure what all the restrictions are, but start simple and work forward.

Hope this helps someone, as many other answers here seem overly complex and full of (naughty) off-site links.

UPDATE: BTW - The official documentation for this is here: https://reactnative.dev/docs/images

Answer from spechter on Stack Overflow
🌐
React Native
reactnative.dev › docs › image
Image · React Native
2 weeks ago - The image source (either a remote URL or a local file resource). This prop can also contain several remote URLs, specified together with their width and height and potentially with scale/other URI arguments.
🌐
React Native Archive
archive.reactnative.dev › docs › images
Images · React Native Archive
If you are building a hybrid app (some UIs in React Native, some UIs in platform code) you can still use images that are already bundled into the app. For images included via Xcode asset catalogs or in the Android drawable folder, use the image name without the extension: <Image source={{ uri: 'app_icon' }} style={{ width: 40, height: 40 }} />
🌐
TutorialsPoint
tutorialspoint.com › react_native › react_native_images.htm
React Native - Images
import React, { Component } from 'react' import { Image } from 'react-native' const ImagesExample = () => ( <Image source = {require('C:/Users/Tutorialspoint/Desktop/NativeReactSample/logo.png')} /> ) export default ImagesExample
🌐
React Native Archive
archive.reactnative.dev › docs › next › image
Image · React Native Archive
import React from 'react'; import { View, Image, StyleSheet } from 'react-native'; const styles = StyleSheet.create({ container: { paddingTop: 50, }, tinyLogo: { width: 50, height: 50, }, logo: { width: 66, height: 58, }, }); const DisplayAnImage = () => { return ( <View style={styles.container}> <Image style={styles.tinyLogo} source={require('@expo/snack-static/react-native-logo.png')} /> <Image style={styles.tinyLogo} source={{ uri: 'https://reactnative.dev/img/tiny_logo.png', }} /> <Image style={styles.logo} source={{ uri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAzCAYAAAA6oTAqAAAAEXRFWHRTb2Z0d2FyZQBwbmdjcnVzaEB1SfMAAABQSURBVGje7dSxCQBACARB+2/ab8BEeQNhFi6WSYzYLYudDQYGBgYGBgYGBgYGBgYGBgZmcvDqYGBgmhivGQYGBgYGBgYGBgYGBgYGBgbmQw+P/eMrC5UTVAAAAABJRU5ErkJggg==', }} /> </View> ); } export default DisplayAnImage;
🌐
Javatpoint
javatpoint.com › react-native-image
React Native Image - javatpoint
React Native Image with tutorial, introduction, environment setup, first app hello world, state, props, flexbox, height and width, listview, scrollview, images, buttons, router, etc.
🌐
React Native Elements
reactnativeelements.com › image
Image | React Native Elements
Drop-in replacement for the standard React Native Image component that displays images with a placeholder and smooth image load transitioning.
Find elsewhere
🌐
GitHub
github.com › DylanVann › react-native-fast-image
GitHub - DylanVann/react-native-fast-image: 🚩 FastImage, performant React Native image component.
Preload images. GIF support. Border radius. Note: You must be using React Native 0.60.0 or higher to use the most recent version of react-native-fast-image.
Starred by 8.4K users
Forked by 1.5K users
Languages   TypeScript 51.9% | Java 31.4% | Objective-C 13.9% | JavaScript 1.3% | Ruby 1.1% | Starlark 0.4%
🌐
Normalize.css
necolas.github.io › react-native-web › docs › image
Image // React Native for Web
import { Image } from 'react-native'; <Image {...props} />; ... All the props supported by View. ... A static image to display while loading the image source.
🌐
JavaScript in Plain English
javascript.plainenglish.io › using-images-in-react-native-668e3a835858
Using Images in React Native. A few hours ago, I was working on a… | by Allan Graves | JavaScript in Plain English
August 8, 2024 - An index.js file is JavaScript code that is used to define a module for React Native. This allows you to specify the imports and exports and other defaults for a module. However, this means that images need to be listed in 2 different locations, once in the JSON and once in the index.js. Not ideal. It’s not ideal because then we have to maintain 2 separate listings — 1 in the JSON and 1 in the JavaScript source files.
🌐
LogRocket
blog.logrocket.com › home › displaying images with the react native image component
Displaying images with the React Native Image component - LogRocket Blog
June 4, 2024 - Network images: images delivered via the web, such as images found and loaded from Google · Static resources: resources available in the device that are always the same — they are neither dynamically loaded, nor do they change · The React Native Image component provides some properties you can use to configure the component and display the images according to your team’s business or technical needs.
🌐
Scaler
scaler.com › home › topics › react-native › react native image component
React Native Image Component - Scaler Topics
July 3, 2023 - You can also use other types of images such as local images and static images by setting the source property to the image file name, which should be in the project's images folder. React Native Image Component has some limitations, which are:
🌐
WithFrame
withfra.me › react-native-tutorials › image-in-react-native
Image in React Native - React Native Handbook | withfra.me
<Image source={{ uri: "https://reactnative.dev/img/tiny_logo.png" }} alt="React Native logo" />
🌐
Decoide
decoide.org › react-native › docs › image.html
Image – React Native | A framework for building native apps using React
renderImages: function() { return ( <View> <Image style={styles.icon} source={require('image!myIcon')} /> <Image style={styles.logo} source={{uri: 'http://facebook.github.io/react/img/logo_og.png'}} /> </View> ); }, Invoked on mount and layout changes with {nativeEvent: {layout: {x, y, width, ...
Top answer
1 of 16
109

This is covered in the documentation under the section "Static Resources":

The only allowed way to refer to an image in the bundle is to literally write require('image!name-of-the-asset') in the source.

// GOOD
<Image source={require('image!my-icon')} />

// BAD
var icon = this.props.active ? 'my-icon-active' : 'my-icon-inactive';
<Image source={require('image!' + icon)} />

// GOOD
var icon = this.props.active ? require('image!my-icon-active') : require('image!my-icon-inactive');
<Image source={icon} />

However you also need to remember to add your images to an xcassets bundle in your app in Xcode, though it seems from your comment you've done that already.

http://facebook.github.io/react-native/docs/image.html#adding-static-resources-to-your-app-using-images-xcassets

2 of 16
97

RELEVANT IF YOU HAVE KNOWN IMAGES (URLS):

The way I hacked my way through this problem:

I created a file with an object that stored the image and the name of the image:

export const ANIMAL_IMAGES = {
  dog: {
    imgName: 'Dog', 
    uri: require('path/to/local/image')
  },
  cat: {
    imgName: 'Cat on a Boat', 
    uri: require('path/to/local/image')
  }
}

Then I imported the object into the component where I want to use it and just do my conditional rendering like so:

import { ANIMAL_IMAGES } from 'path/to/images/object';

let imgSource = null;

if (condition === 'cat') {
  imgSource = ANIMAL_IMAGES.cat.uri;
}

<Image source={imgSource} />

I know it is not the most efficient way but it is definitely a workaround.

Hope it helps!

🌐
MakeUseOf
makeuseof.com › home › programming › working with images in react native
Working With Images in React Native
April 24, 2023 - The React Native image component is the default component provided by the React Native library to render images in your mobile apps. The component can load images from both local and remote sources.