title: PHP to store images in MySQL or not?
body: <p>I have built a small web application in PHP where users must first log in. Once they have logged in, I intend on showing a small thumbnail as part of their "profile".</p>
  
  <p>I will have to ensure the image is below a particular size to conserve space, or ensure it is a particular resolution, or both, or even perhaps use something like image magick to scale it down.<br>
  Not sure what the best approach for that is yet, any ideas welcome.</p>
  
  <p>Also, I have been trying to work out if it is better to store the image in the <code>users</code> table of MySQL as a blob, or maybe a separate <code>images</code> table with a unique id, and just store the appropriate image id in the <code>users</code> table, or simply save the uploaded file on the server (via an upload page as well) and save the file as <code>theUsersUniqueUsername.jpg</code>.
  Best option?</p>
  
  <p>I found a tutorial on saving images to mysql here:
  <a href="http://www.phpriot.com/articles/images-in-mysql" rel="noreferrer">http://www.phpriot.com/articles/images-in-mysql</a></p>
  
  <p>I am only a hobby programmer, and haven't ever done anything like this before, so examples, and/or a lot of detail is greatly appreciated.</p>