title: Fit image into specifically sized box without losing aspect ratio?
body: <p>How can I take an image that has been entered into Wordpress and fit it into a specific sized div without losing it's aspect ratio?</p>
  
  <p>The div is 104px x 104px but the user could literally enter an image into Wordpress at any size.</p>
  
  <p>I'm using the following to insert the image from Wordpress into the page:</p>
  
  <pre><code>&lt;img border="0" src="&lt;?php the_sub_field('logo'); ?&gt;" alt="&lt;?php the_sub_field('text'); ?&gt;" /&gt;
  </code></pre>
  
  <p>I haven't set a width or height.</p>