title: fix image size without re-sizing
body: <p>I have a <code>div</code> which is <code>width:500px;</code> and <code>height:170px;</code></p>
  
  <p>The <code>div</code> contains a <strong>jquery</strong> slideshow which gets random images from my database and displays them. </p>
  
  <p>Problem is that the images are uploaded by users and can be any <strong>aspect-ratio</strong>/<strong>any size</strong>. </p>
  
  <p>I need the images to fit the <code>div</code> without being resized using </p>
  
  <pre><code>style='height:x; width:x;
  </code></pre>
  
  <p>Basically, I want all images to be displayed properly and in acutal quality.</p>
  
  <p>I don't want to restrict which sizes of images can be uploaded as they as displayed in other parts of the site in full size/quality.</p>
  
  <p>Can any provide a solution? </p>