local images folder path => ../media/products/four.jpg api re" /> local images folder path => ../media/products/four.jpg api re" /> local images folder path => ../media/products/four.jpg api re"/>

Setting path to image source in reactnative

303 views Asked by At
<Image
          source={require(`../${item.image}`)}
          resizeMode="cover"
          style={styles.cardImg}
                     
   />       

local images folder path => ../media/products/four.jpg

api response => "image":"media/products/four.jpg",

I want to render {item.image} but can't access the local images folder path.

1

There are 1 answers

0
bhathiyaamarasinghe On BEST ANSWER

I found the answer. Please use following type for that

source={{uri:BaseUrl+item.image}}

Thank You