title: Get Static Path for an Asset in react native
body: <p>In my react native app i am showing several images in <code>&lt;Image&gt;</code> tags and i load those images from local folder.</p>
  
  <pre><code>&lt;Image source={require('./src/images/image1.jpg')} /&gt;
  </code></pre>
  
  <p>I want to save image when the user tapped on it.
  I can get which image user tapped and pass it to the function. But i put a single image path to it.</p>
  
  <pre><code>_onPressButton(imgName) {
    CameraRoll.saveToCameraRoll( './src/images/image1.jpg' , 'photo').then(function(result) {
      alert(result);
    }).catch(function(error) {
      alert(error);
    });
  }
  </code></pre>
  
  <p>But this gives me an error in iOS emulator saying it <strong>cant find the image in the path</strong>.</p>
  
  <p>When i give as,</p>
  
  <pre><code>CameraRoll.saveToCameraRoll( 'https://i.imgur.com/JnrwMpZ.jpg' , 'photo')
  </code></pre>
  
  <p>It works.</p>
  
  <p>But i want to save these files in my src/images folder.
  How can i get a path of this image file OR get this done..?</p>
  
  <p>I appreciate any help regarding this.</p>
  
  <p>Thanks</p>