How to fit a React Native image into its container using flexbox?
<p>Its a dumb question but I am having problem that I am trying to fit image into its container. The Image OverFlows in width:</p>

<p><a href="https://i.stack.imgur.com/jtca5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jtca5.jpg" alt="flexbox image issue"></a></p>

<p>Code : </p>

<pre><code>&lt;View style = {styles.imageContainer}&gt;
        &lt;Image style={styles.img} source={require('./img_1.png')} /&gt;
        &lt;/View&gt;

        &lt;View style={styles.banner}&gt;
        &lt;ScrollView &gt;
            &lt;Text&gt;Hellp Boy&lt;/Text&gt;
            &lt;Text&gt;Hellp Boy&lt;/Text&gt;
            &lt;Text&gt;Hellp Boy&lt;/Text&gt;

        &lt;/ScrollView&gt;
        &lt;/View&gt;
</code></pre>

<p>and Styling Portion :</p>

<pre><code>const styles = StyleSheet.create({

  imageContainer: {
    backgroundColor : '#DB7093',
    flex : 1,  
    padding :  10,
    borderColor : '#7FFF00',
    borderWidth : 10,
  },
  img : {
    flex : 1 ,
    resizeMode : 'stretch',
    overflow : 'visible',
  },
  banner:
  {
    flex : 2,
    padding :  10,
    borderColor : '#7FFF00',
    borderWidth : 10,
  },
});
</code></pre>