Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 143
  • Last Modified:

images: best to store as a file or in the db?

Is it best to store images in a Database?
or is it quicker just simply to keep them as files??

The file upload takes long enough as it is, is there
not yet a further delay when you upload it again to
the database?

1 Solution
I would store the images in a subfolder. then add them to your database as a file pointing to it. Within a program like dreamweaver mx you can set the link up to actually open the image instead of showing the file name and or location. this method works great for example if you had a products database and wanted to show a thumbnail with each product. also with them being in a subfolder you can replace the images with updated ones as long as they kept the same file name and you wouldn't need to update the file string in your database. hope this kinda helps
Yeah. I would only put text into a database. Otherwise it may get too big, and db's weren't made to hold binary data.
3. agreement on using the filesystem.
the server may then use the file-cache and your DB isn't blown up with the BLOBs and in case you delete them needs to defragmented (maybe)
Why is this still open?
Should it be abandoned?
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.  I will leave the following recommendation for this question in the Cleanup topic area:

- Accept domainwalker’s comment as answer

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now