title: How to automatically crop and center an image
body: <p>Given any arbitrary image, I want to crop a square from the center of the image and display it within a given square.</p>
  
  <p>This question is similar to this: <a href="https://stackoverflow.com/questions/493296/css-display-an-image-resized-and-cropped">CSS Display an Image Resized and Cropped</a>, but I don't know the size of the image so I can't use set margins. </p>