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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:53:56+00:00 2026-05-27T14:53:56+00:00

What are some ideas out there for storing images on web servers. Im Interacting

  • 0

What are some ideas out there for storing images on web servers. Im Interacting with PHP and MySQL for the application.

Question 1

Do we change the name of the physical file to a000000001.jpg and store it in a base directory or keep the user’s unmanaged file name, i.e ‘Justin Beiber Found dead.jpg’? For example

wwroot/imgdir/a0000001.jpg

and all meta data in a database, such as FileName and ReadableName, Size, Location, etc.
I need to make a custom Filemanager and just weighing out some pros and cons of the underlying stucture of how to store the images.

Question 2

How would I secure an Image from being downloaded if my app/database has not set it to be published/public?

In my app I can publish images, or secure them from download, if I stored the image in a db table I could store it as a BLOB and using php prevent the user from downloading it. I want to be able to do the same with the image if it was store in the FileSystem, but im not sure if this is possible with PHP and Files in the system.

  • 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-27T14:53:56+00:00Added an answer on May 27, 2026 at 2:53 pm

    Keeping relevant file names can be good for SEO, but you must also make sure you don’t duplicate.

    In all cases I would rename files to lowercase and replace spaces by underscores (or hyphens)

    Justin Beiber Found dead.jpg => justin_beiber_finally_dead.jpg

    If the photo’s belongs to an article or something specific you can perhaps add the article ID to the image, i.e. 123_justin_beiber_found_dead.jpg. Alternatively you can store the images in an article specific folder, i.e. /images/123/justin_beiber_found_dead.jpg.

    Naming the files like a0000001 removes all relevance to the files and adds no value whatsoever.

    Store (full) filepaths only in the database.

    For part 2;

    I’m not sure what the best solution here is, but using the filesystem, I think you will have to configure apache to serve all files in a particular directory by PHP. In PHP you can then check if the file can be published and then spit it out. If not, you can serve a dummy image. This however is not very efficient and will be much heavier on apache.

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

Sidebar

Related Questions

I've read some of the papers out there describing data storing methods for recurring
There are several ActiveRecord styled query builder libraries out there. Some are stand alone
i got the following regex, which is working on some regex testers out there
hello there :) Im trying to figure out how i can grab some content
With all the news out there about iPhones and Android devices storing logs of
I am looking for some ideas/functions to improve a task I coded in a
I have some ideas, some that I have accumulated over time, but I really
I am actually after some ideas to how to address my problem below: I
Can you give me some ideas about how can I make a simple mathematical
So I was digging around to get some ideas on how to create buttons

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.