title: Make Image fill parent, but keep ratio in react-native (dynamic/network images)
body: <p>I want my image to fit as best as possible into it's parent, while keeping its width/height ratio. I fetch the image at runtime, so I don't know the width/height of my images beforehand, so it needs to be dynamic.</p>
  
  <p>In the web I can achieve this with:</p>
  
  <pre><code>.image {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  </code></pre>
  
  <p>This is how it should look like (simplified):<br>
  <a href="https://codepen.io/laurentsmohr/pen/OBEGRG?fbclid=IwAR1-dFcTC7vvXwd0m2NTeCMxm6A6Uzv0lFx2UUCNpgFnpSgEm9aHhr14LK4" rel="nofollow noreferrer">https://codepen.io/laurentsmohr/pen/OBEGRG?fbclid=IwAR1-dFcTC7vvXwd0m2NTeCMxm6A6Uzv0lFx2UUCNpgFnpSgEm9aHhr14LK4</a></p>