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 6920977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:13:03+00:00 2026-05-27T10:13:03+00:00

I have read that using BLOB to save a path of a picture to

  • 0

I have read that using BLOB to save a path of a picture to a database is the best rather than using the database to save the picture.

Can someone please show me some code on how to do this? Like if I had users registered on my database, how would they upload their picture to their profile and if they click on their own profile, it will also retrieve their picture as well as their information on my database?

EDIT

I’m using PHP and actually have just normal fill in form and process form. I am about to make a browse ‘picture’ button on the form as well but don’t know how to process the rest by insert it.

My database would later on hold more pictures and would be very big as loads of people would insert pictures and diagrams etc. So I thought the database would just hold the path as it would process much quicker.

Not sure what to do, something like insert picture into database then save it onto my folders somewhere and delete the picture from the database and have the path of the picture in that folder saved in my database?

  • 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-27T10:13:03+00:00Added an answer on May 27, 2026 at 10:13 am

    It sounds like you’re slightly confused about database blobs, images, and paths. Let’s step through this.

    When your users upload images of significant size, you’ll want to store them in the filesystem, and record the path in the database. The path is just a string – you can use a plain old VARCHAR type of column for it.

    If you wanted to store the image itself in the database, you’d use a BLOB type of column. A blob is a “binary large object” – it’s how you’d store data that’s not some flavor of string or number. If your users’ profile pictures are small (e.g. Twitter-sized avatars), then you might consider storing them in the database as BLOB data.

    However, your main question of “okay, how do I implement this?” can’t be answered without knowing what programming language and database you’re using. You might want to provide more information so that you can get a better answer to that question.

    EDIT: Responding to your clarification: yes, you should definitely store paths in the database and images in the filesystem. That’s the standard way to do it. One of the major reasons for this is that you can operate on the images separately from operating on the database. It’s much, much, much easier to back up a folder full of pictures than it is to back up a large database! You can also, for example, automatically create thumbnail versions of the images, or compare them to one another, and so on, using other applications that won’t have to touch your database.

    Here’s a tutorial from Tizag about how to upload files with PHP, and here’s a tutorial from W3Schools about it. On Stack Overflow, you might find the questions “PHP Image Upload” and “Image Upload Script in PHP” helpful.

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

Sidebar

Related Questions

I have read that a using like this: using (myObject) { myObject.DoStuff(); } Can
I am using Liferay 6 . I have read that Liferay Hooks can be
I have read that using database keys in a URL is a bad thing
I have read that to match a word inside of a string using Regular
i have read in more then one place that using NHibernate's Identifier as Primary
I am using mingw64 to compile a DLL . I have read that: The
Throughout a Bison grammar I am using right recursion, and I have read that
I have a config file that I read using the RawConfigParser in the standard
I have a gzipped text file that I'm trying to read within PHP (using
I have a c program that is trying to read in a file. Using

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.