title: What's the best way to handle resizing of thumbnails for dynamic images?
body: <p>I have a web app that lets users upload images.  The images then appear as thumbnails on the app, and when a user clicks on the thumbnail it shows the full size image.  Pretty standard.</p>
  
  <p>Right now I'm storing the images in a MySQL database, and have the entire app running on Jboss.  To display the thumbnails, I have an IMG html tag that points to the full size image, and I just set the width and height to 50px.  This loads the image out of the db, sends the entire thing to the client, and then resizes it in the browser.  Obviously this seems like a big waste of resources and makes the pages take a long time to load, since there could be a lot of thumbnails on the page, so I'm trying to figure out the best way to improve this.</p>
  
  <p>I found an <a href="http://search.cpan.org/~wross/Apache-Imager-Resize-0.11/lib/Apache/Imager/Resize.pm" rel="nofollow">apache module that resizes images on the fly</a>.  So I was thinking I could use that to send the thumbnails to the client, reducing the bandwidth and page load time.  Since my images are stored in the database, is it possible and efficient for Apache to serve them?  Should I be storing the images on the file system instead?  Any suggestions on how I should handle this?</p>