title: Fit images (both landscape and portrait) into square thumbnail
body: <p>I'm really struggling to get images that are both landscape and portrait orientation to fit nicely into a square thumbnail for the purpose of a gallery.</p>
  
  <p>I've tried a variety of CSS tricks but think i need to maybe use Javascript.</p>
  
  <p>Anybody have any idea how i could solve this?</p>
  
  <p>EDIT - the HTML/CSS can be anything, at present it simply prints out images with a class of thumb-square, ie.</p>
  
  <pre><code>&lt;img class="thumb_square" src="/images/uploads/pic.jpg"/&gt;
  &lt;img class="thumb_square" src="/images/uploads/pic2.jpg"/&gt;
  &lt;img class="thumb_square" src="/images/uploads/pic3.jpg"/&gt;
  </code></pre>