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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:14:34+00:00 2026-05-23T02:14:34+00:00

I am doing some work with storing members photos in the database and I

  • 0

I am doing some work with storing members photos in the database and I am wondering whether I should store photo paths like this:

http://www.domain.com/path/to/photo

or like this

/path/to/photo

Specifically, I am concerned with the fact that I now have 1 server, but over time, I will have more than one, and down the line I might have a CDN serve up the photos. What is the good-practice way of storing the paths for the long term?

Thanks!
Alex

  • 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-23T02:14:34+00:00Added an answer on May 23, 2026 at 2:14 am

    This really comes down to personal preference.

    If concise paths are important and indexing and searching won’t be completed on the column then store the whole thing (although note your first form still contains assumptions – what if you also server the photos through HTTPS – they each file has two paths).

    If data size and normalization is important store just the largely changing part of the URL and assume the consistent part. If that changes over time, ALTER the table and make a one time UPDATE to append the existing assumed URL.

    Finally physical storage and logical presentation can be two different things – using an MVC design you could have a controller that turns a requested /path/to/myimage.jpg into cdn.example.com/myassets/0123/123122.jpg

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

Sidebar

Related Questions

In doing some bioinformatics work, I've been pondering the ramifications of storing object instances
I'm doing some work with grades and the desire2learn Valence API. In the context
I am doing some work to track down a perceived bug in a git
I'm doing some work with Ukkonen's algorithm for building suffix trees, but I'm not
I'm doing some work with registry hives, and I need to know if the
I am doing some work on an inbound call demand capture system where each
I'm doing some work with the JavaSound API to send a MIDI System Exclusive
I am doing some work with Web.Routing, using it to have friendly urls and
I'm doing some work with stats, and want to refactor the following method :
Recently I'm doing some work with two Series in pandas: The first Series contains

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.