title: Vertically anchor an image to its top in React Native
body: <p>I have some code to have an image of random size spread to the full width of a container + vertically center inside the container. But what I need is to anchor it at the top.</p>
  
  <p>In CSS i would use background-position, but it's not supported in React Native. I feel I've tried every combination of resizeMode, absolute positioning, etc - but still haven't been able to figure it out.</p>
  
  <pre><code>&lt;View style={{
    flex: 1,
    height: 120,
  }}&gt;
    &lt;Image source={{uri: source}} style={{
      flex: 1,
      width: '100%',
      resizeMode: 'cover'
    }}&gt;
    &lt;/Image&gt;
  &lt;/View&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/zWdfT.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/zWdfT.jpg" alt="enter image description here"></a></p>