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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:21:48+00:00 2026-05-20T13:21:48+00:00

I am building a forum type site whereby the users will have an avatar.

  • 0

I am building a forum type site whereby the users will have an avatar. The main page will have a small version whereas the single page will have a large version of the avatar.

So for sake of bandwidth, I will have different sizes:

example.png
example_thumb.png

What is the preferred storage and retrieval method for the different sizes?

Here’s what I have come up with so far:

User Table    UserId  |  AvatarName  |  AvatarExt
              1       |  example     |  .png

This way I can get the base and thumb version with the same query as long as I know that there is a ‘_thumb’ version

Or should I create a meta table like so:

UserMeta      UserId  |  Avatar             |  AvatarType
              1       |  example.png        |  original
              1       |  example_thumb.png  |  thumbnail

I would love some advice

  • 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-20T13:21:48+00:00Added an answer on May 20, 2026 at 1:21 pm

    You are on the right track.

    Users:

    id
    username
    ...
    

    Avatars

    id
    user_id
    avatar_type(original, thumbnail)
    file_name
    

    Then you can do:

    select * from avatars where user_id = $user_id and avatar_type='thumbnail'
    

    This allows you to, say, allow users later on to have multiple avatars without modifying your tables.

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

Sidebar

Related Questions

I'm building a forum type site in which posts will have different types: Discussion,
im building a forum and now im gonna code the thread page. is there
I have a idea of building a unique forum. This forum would focus on
I'm building a simple web based forum application. I want to allow users to
I'm building a small scale forum script in PHP, and I am having difficulty
I'm creating custom forum software for a site I'm building, which includes 2 tables
Outline I'm building a form for a specific page, where users can make suggestions
This is my first time building a site with Drupal (7). I have plenty
I would like to have a go at building a 'Wufoo' type form builder.
I've been building this site that will get run an API depending on the

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.