Best way to store image data in DB ? in Application Design Posted December 15, 2009 Say you have an image 20091212_81986783.jpg that is stored locally on your server at, /home/website/public_html/static/uploads/ You serve these images from static.example.com/uploads/20091212_81986783.jpg Would you store the whole url in the database, or just the file name? and in the long term what scales better if you have ever to move the files to many servers and serve them off urls like static1.example.com and static2.example.com ? If you stored the whole url in the database, if you ever dispersed the files, you would have to update every row in the database where this image is and update it url. Storing file name only: How the how heck would you know what server its on when it beyond local storage? Just something that been thinking about for last few months :?