There's a pretty big debate about whether it's better to store the raw image data vs. a filename in the database. Personally, I prefer to store the path in the database, since it's generally the filename you need when generating the <img> tags in your HTML documents, not the actual binary image data.
One of the most frequently mentioned arguments FOR storing binary data in the database is that it makes it easier to migrate your site from one server to another. My response to that is that one generally doesn't migrate their sites all that often, and if they do, the extra effort is simply zipping up the filesystem that stores the images and extracting it on your new server. Usually this is pretty painless, so long as the paths you store in the database are relative. If you store an absolute path in your database, then yeah, it becomes more of a headache to convert these to match the absolute path on your new server. Still, this can be done with a really really really simple/short PHP script or database query.
Take care,
Nik
http://www.bigaction.org/