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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:27:23+00:00 2026-05-16T18:27:23+00:00

I have one simple question. Now I’m working on a e-commerce script and of

  • 0

I have one simple question. Now I’m working on a e-commerce script and of course users will be able to upload images for each product (up to 10 images for each product). So my question is should I place all the images in the same directory (it will probably be thousands after a time) or create new ones from time to time? Will this slow down the performance or cause any other problems in future if I place them all together?

Thanks in advance

  • 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-16T18:27:23+00:00Added an answer on May 16, 2026 at 6:27 pm

    Disk approach

    Create an img parent directory, with a subdirectory for each product’s images.

    ./img
    ./img/eggs
    ./img/eggs/eggs1.jpg
    ./img/eggs/eggs2.jpg
    ./img/spam
    ./img/spam/myspamimage.jpg
    ./img/cheese
    ...
    

    This way you’ll have all your images stored in a single tree hierarchy that makes good sense. If you’re going to have a very large amount if images (say, more than 100,000) you can group the images according to creation date:

    ./img
    ./img/2010-08/eggs
    ./img/2010-08/eggs/eggs1.jpg
    ./img/2010-08/eggs/eggs2.jpg
    ./img/2010-09/spam
    ./img/2010-09/spam/myspamimage.jpg
    ./img/2010-09/cheese
    ...
    

    This way, you will be able to move some months (probably the older ones) to an archive and keep the month subdirectory as a link to another disk.

    Database approach

    If you need to keep a lot of metadata on each image (e.g., username, SKU, description, copyright etc) you can store the images using arbitrary image names (probably img/img0000001.jpg, /img/img0000002.jpg, …) and keep a database record that maps a product to its image. This is very useful for searching all the images with a certain characteristics (user, creation date, etc.) associated with them.

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

Sidebar

Related Questions

this time i have a simple question: I have one table, related with himself
Hopefully a simple question although one I have found impossible to answer myself using
I have a fairly simple question: how to take one row of cv::Mat and
Simple question, I think. I have org.springframework.scheduling.quartz.CronTriggerBean triggering one job once a day. Because
This is probably a basic html/css question... I have a simple one-button form that
I have a simple question hopefully - how does one free memory which was
Here is one very simple question(or at least at first sight).Let's say we have
I have one simple question about signals in Linux systems. As I understand every
Hallo I'm new to Rails and have one simple question. I'm using radiant as
I have a simple question yet it's not working out. See this html: <div

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.