Best way to store user's avatars

jskidd3

I have a website where users each have their own profile page. Here they can upload a single image that acts as their avatar. This is the only image users can upload to the server across the whole site. There is no archive so it can be overwritten if a user wishes to update their avatar.

I have never had to do anything like this before so I would like to open it up and ask for a suitable, scalable option for this website.

My initial thought is to give each user's image a random name, a string 6-12 characters long. This way you couldn't build a script that just pulls every user's profile pic from a directory (eg 001.png, 002.png etc). My second thought is that there should be only be a certain amount of images per directory to make sure they can be retrieved quickly by the server.

There may well be other things I'm missing here, I'm not sure on exact details hence why I'm asking.

Lloyd Banks

I would recommend storing the images on something like Amazon S3. Depending on how many pictures you're storing, serving images can really take a tow on your web server. S3 is scalable and with multi-zone deployments through CloudFront (Amazon's version of a CDN), you can really speed up this part of your service.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Best way to store user settings

From Dev

What is the best way to store a user feature?

From Dev

What is the best way to store user notifications in MySQL?

From Dev

What is the best way to store a user feature?

From Dev

Best way to store data using APDU's?

From Dev

What's the best way to store an id in local?

From Dev

Best way to get user's IP?

From Dev

Best way to determine user's language

From Dev

What is the best way to get a user's city?

From Dev

Best way to store ASP.NET 4.5 MVC user data

From Dev

best way to store Google user-ID value in mysql and java

From Dev

Best way to store locators

From Dev

Best way to store files

From Dev

Best way to store content?

From Dev

What's the best way to store URLs, or URL domains, in AngularJS app?

From Dev

What's the best way to store Phone number in Django models

From Dev

What's the best way to store an array in a relational database?

From Dev

What's the best way to store several values as a key in a map

From Dev

What's the best way to store session ID in iOS?

From Dev

what's the best way to store named range information?

From Dev

What's the best way to store checkboxes in a PostGres database

From Dev

What's the best way to store data for different lists?

From Dev

What is the best way to locally store and quickest way to retrieve app user settings/preferences?

From Dev

Best way to authenticate user

From Dev

Best way to alert user

From Dev

Best way to distribute user's public SSH key to many hosts?

From Dev

Best way to distribute user's public SSH key to many hosts?

From Dev

Secure way to store pending user's password in Meteor

From Dev

Secure way to store pending user's password in Meteor

Related Related

HotTag

Archive