I'm working on a site that will hopefully be getting a fairly large audience. Up till now I've been storing uploaded images in the directory structure, saving info about the file (path/filename) and assembling that into HTML when displaying. When I upload images, my upload code resizes them via GD Lib to the various sizes needed by the site - usually a full-size (max width for the site), inset-in-paragraph and thumbnail for each source image.
Wondering whether it would be better - or worse - to instead store the image data in the database - I guess that'd be as a "BLOB" field? Never used these before so I'm not sure.
And then when displaying the site, I retrieve that data and - what - make individual images via GD Lib, and output with their own headers? Would I want to upload a separate BLOB for each image size, or perhaps just one for the biggest and generate the smaller ones off it?
The biggest advantage, as far as I can see, is no issues with having images live in a separate place than text. It's all in the same place, all gets backed up when the database is backed up (daily), and no permissions issues when moving from one server to another.
But it seems like perhaps it could be slower, or force more data throughput, or make the database giant. Not talking about a LOT of image data - typically 1-2 per page, max size maybe 640 x 480. Probably up to a couple thousand pages on the site. Expected traffic unknown - could be hundreds to thousands of page visits per day, could be more.
Any thoughts regarding best practices - or best choices for my situation?