title: How do I batch-resize images in ImageMagick while maintaining aspect ratio and a max width and height?
body: <p>I have a folder of hi-res images. It's a mix of JPG and 24-bit transparent PNG. I want to batch-generate thumbnails with the following rules:</p>
  
  <ul>
  <li>each image retains its format (.jpg in, .jpg out... .png in, .png out)</li>
  <li>each image retains its filename but gets moved to a /thumbnails subfolder</li>
  <li>each image retains its current aspect ratio</li>
  <li>the final dimensions of each processed image should be as large as possible with these constraints:</li>
  <li>max image width is 488px</li>
  <li>max image height is 220px</li>
  <li>aside from scaling, each image should retain all of its other properties</li>
  </ul>
  
  <p>I am new to ImageMagick and have no idea what command(s) I would need to run in order to achieve this result. Ultimately, this is for a Jekyll project, but I would happily settle for being able to run this process manually via command line.</p>
  
  <p>Any help would be much appreciated!</p>