title: Force image in flex container to match the height of other flex elements
body: <p>I have two side by side flex elements with fixed width, one with text and one with an image. How can I force the size of the image in the right container to dynamically match the height of the text in the left container, while preserving the aspect ratio and avoiding cropping?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.flexbox {
      border: 1px solid;
      width: 400px;
      margin: 10px;
      display: flex;
  }
  
  .left {
      width: 60%;
  }
  
  .right {
      width: 40%;
      display: flex;
      justify-content: flex-end;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="flexbox"&gt;
      &lt;div class="left"&gt;
          Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
      &lt;/div&gt;
      &lt;div class="right"&gt;
          &lt;img src="https://via.placeholder.com/100x200" class="placeholder" /&gt;
      &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>