Page 1 of 1

Should I store pictures in a database or just in a folder.

Posted: Wed Sep 12, 2007 8:56 pm
by Redlightpacket
I plan to make a huge website that will store several thousands of pictures or more. I'm wondering which direction I should go in. When it comes to storing pictures in a database or in a file directory. Thanks.


Chris Clark
Redlightpacket@gmail.com

Posted: Wed Sep 12, 2007 8:58 pm
by feyd
We've talked about this ad nauseum. Files go in directories.

Posted: Wed Sep 12, 2007 11:16 pm
by swiftouch
Store the filename, picture name, etc, in the database. Store the physical file in a folder on the server. At least that's the way I've always done it.

Posted: Thu Sep 13, 2007 3:06 am
by Maugrim_The_Reaper
Use the filesystem - the number of times an image needs to be buffered and streamed between Apache/PHP/MySQL is just too expensive. Use the database only to keep a record of images and their locations so the collection is manageable. Otherwise just leave them to Apache alone to retrieve.