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 › images
Images · React Native
2 weeks ago - A caveat is that videos must use ... currently passed for non-image assets. This limitation doesn't occur for videos that are linked directly into Xcode or the Assets folder for Android. If you are building a hybrid app (some UIs in React Native, some UIs in platform code) ...
🌐
|
reactnativecode.com › home › get image from local resource folder in react native android ios tutorial
Get Image from Local Resource Folder in React Native Android iOS Tutorial
August 12, 2024 - So single image file works for both. Start a fresh React Native project. If you don’t know how then read my this tutorial. Add Image component in import block. Create folder for image inside your project’s folder and put your image in it. Add Image tag in render’s return block. Add Source attribute in Image tag and Assign image path using require.
🌐
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 - Ignore Lines 3–6: They are getting a URI locally. We could have easily downloaded any URI from anywhere. In fact, when working with http, we can just load the image from that URI directly. I’m only using this as an easy way to get the file on the device for this step. 💡 Learn about the server-driven UI approach in React Native:
🌐
GitHub
github.com › facebook › react-native › issues › 26880
Get absolute local image path for android · Issue #26880 · facebook/react-native
Hi , I am trying to share image on android. I use react-native-share to share image and react-native-fs to get image path from my local image. On ios work fine. I get path like 'file://' + ...
🌐
GitHub
github.com › facebook › react-native › issues › 6998
How a Image component showing by a absolute local path · Issue #6998 · facebook/react-native
April 16, 2016 - <Image source={{isStatic:true, uri:'/Users/jay/Library/Developer/CoreSimulator/Devices/00520C5F-1307-427E-AA55-9E1E020B2EFB/data/Containers/Data/Application/522D5404-A2EF-4117-A768-CF63A6A3EE8F/Library/Caches/6ea32f8825c207ec582ad684ac6a3494'}} style={imageStyle} />
🌐
GitHub
github.com › facebook › react-native › issues › 751
Unable to use local tmp file path for Image.source · Issue #751 · facebook/react-native
April 8, 2015 - source {uri: string} uri is a string representing the resource identifier for the image, which could be an http address, a local >file path, or the name of a static image resource (which should be wrapped in the >required('image!name') function).
Author   mattotodd
🌐
GitHub
github.com › facebook › react-native › issues › 23844
Image doesn't render local source (path with no extension name) · Issue #23844 · facebook/react-native
March 10, 2019 - // write image to local path(iOS native code) NSString *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES).firstObject; NSString *filePath = [path stringByAppendingPathComponent:[NSString stringWithFormat:@"image"]]; [UIImagePNGRepresentation(image) writeToFile:filePath atomically:YES] // under iOS (it works great) [UIImage imageWithContentsOfFile: filePath]; // under react native (Could not find image filePath) <Image source={{ uri: filePath }} /> // If the filePath with extension name it works on both NSString *filePath = [path stringByAppendingPathComponent:[NSString stringWithFormat:@"image.png"]]; [UIImagePNGRepresentation(image) writeToFile:filePath atomically:YES]
🌐
DEV Community
dev.to › skptricks › get-image-from-local-resource-folder-in-react-native-4ml7
Get Image From Local Resource Folder In React Native - DEV Community
August 7, 2018 - In this tutorial, we will explain how to get image from local resource folder and display the image in react native application. This example covers, fetching and displaying an image from network location using Image Component of react native.React native provides a unified media management system so developers can easily manage all the image files by placing them together into a single folder.
Find elsewhere
🌐
MakeUseOf
makeuseof.com › home › programming › working with images in react native
Working With Images in React Native
April 24, 2023 - Here's an example of a source path to a local image: <Image source={{ uri: 'file:///path/to/my-image.jpg' }} /> Network images are delivered via the web. They could include HTTP/HTTPS URLs or base64-encoded data URIs, which embed data directly into the URL using the Base64 encoding scheme. There are several props you can use to style and customize the React Native Image component.
🌐
GitHub
github.com › facebook › react-native › issues › 42234
Image doesn't render from local path with no extension (iOS only) · Issue #42234 · facebook/react-native
January 10, 2024 - Remote url Image is loaded and stored using react-native-fs and named as Z23qdxp_348: /var/mobile/Containers/Data/Application/500161AF-8D6A-4A97-B746-0D0E12421768/Library/Caches/Z23qdxp_348 · Note: If the change image name to Z23qdxp_348.jpeg the image become visible. (Works even for jpg and png image formats). ... Save it without extension in fileUri variable. Render <Image source={{uri: fileUri}} onError={(error) => console.error(error)}>
Author   Romick2005
🌐
IQCode
iqcode.com › code › javascript › react-native-image-source-local-file
react native image source local file Code Example
November 2, 2021 - w do i add an image in react native image set in react native images for react native importing a picture in react native react native attach image image add in react native react native Image require react native create image load pictures properly react native how to preload uri image react native how to add an image in react native react native choose local image react native require image how to add an image from your computer in react native show local image in react native react native how to import local image react- native image react native image get local images from file:/// react n
🌐
GitHub
github.com › facebook › react-native › issues › 17096
Image component with local uri source (file://) does not render initially · Issue #17096 · facebook/react-native
December 6, 2017 - const image = {uri: 'http://my.bamps.online/cfs/files/images/D8Xg27puAiqjvKetD?store=normal'} // image2 is cached version of image by react-native-cached-image const image2 = {uri: 'file:///data/data/com.testcachedimage/cache/imagesCacheDir/my_bamps_online_e6d51c26611343fb5e8c3e493674423c3d3f3943/38baef384cbb5bcc5f6138ca0653884561f85fde.jpg'} export default class App extends Component<{}> { render() { return ( <View style={{backgroundColor:'#777'}}> <Image source={image2} style={{width: 100, height: 100}}/> <Image source={image2} style={{width: 300, height: 100}}/> <ImageBackground source={image2} style={{width: 100, height: 100}}/> <ImageBackground source={image2} style={{width: 300, height: 100}}/> <Image source={image} style={{width: 100, height: 100}}/> <Image source={image} style={{width: 300, height: 100}}/> </View> ); } }
Author   kuznetsov-online
🌐
Medium
careerwithvasanth.medium.com › how-to-use-local-images-dynamically-in-react-native-71b9f3b0db20
How to use local Images dynamically in React Native | by Vasanth Bhat | Medium
May 16, 2020 - In case your thinking, what is this error message is, It means in react all the static Image path has to be specified during the compilation itself, anything specified dynamically is considered as an error. They also recommend if the number of Images that your using locally exceeds certain number, then push it to your server and refer the path in the application.
🌐
Medium
medium.com › @mauriciocarlezzo › react-native-local-images-the-dark-side-f65145f67f86
React Native local images — the dark side | by Maurício Carlezzo | Medium
August 3, 2020 - The image uri (path) should be like this /Users/foo/Library/Developer/CoreSimulator/Devices/59A6C38A-F325–4BA6-AA77–98095323FE69/data/Containers/Data/Application/938FA97F-5C73–4E3C-BB7D-07BCDF8D3009/Documents/image-name.jpg · Ok a few ...
🌐
React Native Archive
archive.reactnative.dev › docs › next › image
Image · React Native Archive
uri - a string representing the resource identifier for the image, which should be either a local file path or the name of a static image resource (which should be wrapped in the require('./path/to/image.png') function).
🌐
SKPTRICKS
skptricks.com › 2018 › 07 › get-image-from-local-resource-folder-in-react-native.html
Get Image from Local Resource Folder in React Native | SKPTRICKS
July 7, 2018 - In this tutorial, we will explain how to get image from local resource folder and display the image in react native application. This example covers, fetching and displaying an image from network location using Image Component of react native. React native provides a unified media management system so developers can easily manage all the image files by placing them together into a single folder.
🌐
GitHub
github.com › react-native-image-picker › react-native-image-picker › discussions › 1930
How to get physical path of an image on local file system v4.7.1? · react-native-image-picker/react-native-image-picker · Discussion #1930
April 8, 2015 - launchImageLibrary(options, response => {. //options is "photos" //console.log("response in pikcupImage : ", response); if (response.didCancel) { Alert.alert('Cancelled'); return false; } else if (response.errorCode || response.errorMessage) { console.log('User cancelled photo picker'); return false; } else { //response.assets is object array let temp = []; response.assets.forEach((aset, i) => { console.log("aset in picker : ", aset); extension = aset.fileName.slice(aset.fileName.lastIndexOf(".") + 1).toLowerCase(); console.log(" extension ", extension); if ((mediaType === 'photo' && imageAllowedExtensions.includes(extension)) || (mediaType === 'video' && videoAllowedExtensions.includes(extension))) { aset.path = aset.uri; temp.push(aset); }; }); if (temp && temp.length>0) updatePicks(temp); return true; } })
Author   react-native-image-picker