Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3694056
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:27:04+00:00 2026-05-19T04:27:04+00:00

Possible Duplicate: Storing Images in DB – Yea or Nay? I need to store

  • 0

Possible Duplicate:
Storing Images in DB – Yea or Nay?

I need to store profile pictures. Lots of them.

I’m not sure if I should store them in the database. I’m not even sure if that’s a good idea to begin with, or if I should just store them in a separate directory on the server, and disallow access to them with HTAccess.

But I’m not overly familiar with HTAccess and when I have used snippets to disallow access to a folder, it has just never worked.

I am using winhost.com to host my sites, so I would assume that HTAccess would work.

Can anyone suggest which way would be better for storing tens of thousands of profile pictures on a single server? I have read many blogs, forum posts etc that I’ve found on Google, and am a little bit more confused since half of them suggest one thing, and the other half disagree and suggest using a database would be perfectly fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:27:04+00:00Added an answer on May 19, 2026 at 4:27 am

    There is a trade off – it will depend on your exact situation and needs. The benefits of each include

    Filesystem

    • Performance, especially caching and I/O

    Database

    • Easier to scale out to multiple web servers
    • Easier to administer (backup, security etc)

    I’m guessing that you are using MySQL, but on the off chance that you have a SQL 2008 DB, have a look at FileStream in this SO article – this gives the best of both worlds.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Storing Images in DB - Yea or Nay? To Do or Not
Possible Duplicate: Storing Images in DB - Yea or Nay? For ages I've been
Possible Duplicate: Storing Images in DB - Yea or Nay? Images in database vs
Possible Duplicate: Storing Images in DB - Yea or Nay? i am curios about
Possible Duplicate: Storing Images in DB - Yea or Nay? Is it faster and
Possible Duplicate: Storing Images in DB - Yea or Nay? I am making an
Possible Duplicates: Storing Images in DB - Yea or Nay? Saving images in database
Possible Duplicate: PHP image resize on the fly vs storing resized images I was
Possible Duplicate: Storing a password I am using shared preference to store password. Is
Possible Duplicate: PHP 2-way encryption: I need to store passwords that can be retrieved

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.