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

  • Home
  • SEARCH
  • 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 6477213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:55:15+00:00 2026-05-25T06:55:15+00:00

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

  • 0

Possible Duplicate:
Storing Images in DB – Yea or Nay?
To Do or Not to Do: Store Images in a Database

I’m currently in the process of creating my friend’s artist portfolio website. She asked me to create a simple system where she can upload an image and it will be displayed on the site according to the category it is in. I’ve stumbled upon several useful and interesting ways in which to achieve this and I’ve narrowed it down to the two that seem the most useful for me. Unfortunately, I do not know which one would be a better choice.

Option A: http://www.phpriot.com/articles/images-in-mysql

This method uses a very controversial way of storing images in a mySQL
table using the blob datatype. I’ve read that it isn’t recommended
by many PHP programmers, however, it does seem like it can fit my
needs perfectly. From what I understand it is fairly simple and easy:

  1. Upload Image to DB
  2. Display Image from DB according to category chosen.

Option B: http://webdeveloper.com/forum/showthread.php?t=101466

This method only shows how to upload an image to a directory using
PHP. I figured once that is done I could make a simple list of all the
images in that directory and put it into an array. Afterwards loop
through the array and display those items in <img> tags.

So, you see, I am still learning how to work with PHP and mySQL and this website is great motivation to learn. However, I’m unsure
of which method to use, or if there is a single method most web developers use?

Questions to Think About // TL;DR

  • What is the best method for uploading images that most of you use?
  • Would you consider using mySQL ‘blob’ datatype?
  • If uploading the image to a file directory is best, how would I display
    the images–using an array, placing the list of images in a DB, or something entirely different (because I’m a noob and don’t know any better)

Thanks in advance for any replies!

  • 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-25T06:55:16+00:00Added an answer on May 25, 2026 at 6:55 am

    I wouldn’t use database storage for large images, just upload them and write the file path/name and details into a database. Have a field in the database for Priority if you need to retrieve the images in a specific order

    Just found Uploadify today, works great

    • 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? Images in database vs
Possible Duplicate: Storing Images in DB - Yea or Nay? I need to store
Possible Duplicate: Storing Images in DB - Yea or Nay? For ages I've been
Possible Duplicate: Storing Images in DB - Yea or Nay? i am curios about
Possible Duplicates: Storing Images in DB - Yea or Nay? Saving images in database
Possible Duplicate: Storing Images in DB - Yea or Nay? Is it faster and
Possible Duplicate: Which collection for storing unique strings? I am currently using a Dictionary<string,
Possible Duplicate: Storing third-party libraries in source control I'm currently starting a project which
Possible Duplicate: Storing a password I am using shared preference to store password. Is
Possible Duplicate: Storing credit card details I'm working on creating an architecture for a

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.