Where to put images in a react-native project?

You can add image folder to src(src/image/index.js). Image folder add index.js file create and add whole app image.
In index.js file set

export const IMAGENAME = require('./icon.png'); 

When import image folder

import { IMAGENAME } from '../image';

Use image:

<Image source={ IMAGENAME } />

You can add image to image folder and set path to index file.
Hope this will help you.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)