₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,727 members, 8,423,473 topics. Date: Tuesday, 09 June 2026 at 06:52 PM

Toggle theme

Show Image From HTTP URL In React Native - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingShow Image From HTTP URL In React Native (2061 Views)

1 Reply

Show Image From HTTP URL In React Native by skptricks(op): 3:50pm On Jul 01, 2018
Show Image From HTTP URL In React Native

In this tutorial we will explain how to display image in react native application using HTTP URL. This example covers, fetching and displaying an image from network location using Image Component of react native.

Point To Remember while loading image in Image Component.
Note that for network and data images, you will need to manually specify the dimensions of your image!
Show Image From HTTP URL in React Native

App.js
This Component helps to display image from HTTP URL. Follow the below steps, that helps to configure Image Component in App Component.

1. Add Image Component in import block.
import {
Platform,
StyleSheet,
Text,
View,
Image
} from 'react-native';

2. Add Image tag in render’s return block.
Source attribute in Image tag, where we are specifying the image location.
Also we have added inline style to Image tag, that helps to set the image size as per the device width.
<Image
style={{width: '100%', height: 200,resizeMode : 'stretch' }}
source={{uri: 'https://4.bp..com/-krdeTqQLML8/Wyf2oV7eedI/AAAAAAAABpI/OZ759swV7L8wWtt2pwBXIgp6aPz33r01gCLcBGAs/s400/fist%2Bapp.jpg'}}
/>


https://www.youtube.com/watch?v=qArk3mRoO7c

1 Reply

How To Fetch New URL In New Search Console ?React Native Open Website URL In Default Browser Android ExampleGet Current Page URL In PHP234

Learn Data Science In 3 MonthsI Need A Code To Allow Download FromI Need Opay Ride Clone App