Social Question

Ranimi23's avatar

Do different web sites use different size avatars to maintain user avater image in several sizes?

Asked by Ranimi23 (1917points) December 5th, 2009

I will give two examples what I mean:

1. At Fluther I have my avatar image in small size like you see here near my question and answers, but in my profile page I can see my image in another big size, where I can upload a new image if I want to.

2. At Facebook when I write status I have my image at one size, but If I add a comment my image size is smaller and not at the same size at all.

My question is how web sites in the real world are saving my user picture. Are they saving my picture in all the sizes needed to be display, or there is only on size picture is saved in DB and in every page the picture is being calculated to the size needed.

It looks to me a lot of work to caculate the pictures of all the users needed to be display in one page. I just want to know what is the solution to that problem and what web sites really do with my only one picture I use.

Observing members: 0 Composing members: 0

7 Answers

jaytkay's avatar

Several sizes. You are correct, it would be work to create different sizes on the fly, so they store separate images for different purposes.

For example, looking at the image properties for my Fluther avatar, I see two file names:
jenniicon_profile.jpg
jenniicon_thumb.jpg

pjanaway's avatar

In my opinion its better to store them in different sizes, not only it helps the caching situation. Also saves bandwidth int he long run, since your not loading the full sized image. It also means you don’t have to waste the servers cpu regenerating the sizes of them.

From what i have seen, most websites do create seperate images (well popular ones ;)) Newbies who make personal sites do not. :)

Ranimi23's avatar

This is very interesting. It means that each user takes a lot of memory site for replication of the same image in several sizes. If the site has a 1 million users, according to that I assume they have 3 million images to keep.

This is a lot, something really significant and important to refer to it as a community site programmers. I wonder if there is another approach to sites of holding a single image to calculate the size of her every request is different.

P.S.
I see fluther also save the image in the real size I upload it?

jaytkay's avatar

It means that each user takes a lot of memory site

Yes, but on-site storage is cheap. Sending the smallest image necessary across the Internet saves bandwith costs and makes the site work much, much faster.

Ranimi23's avatar

BTY – maybe this is another question but still:
How to resize a picture without compromising quality?
Does any one know a good code in C# that do that?

Ranimi23's avatar

P.S.
I read that the problem for images in diffrenet sizes is being done today with AJAX, so there is no need to save the same image in all sized needed. Is that correct?

Answer this question

Login

or

Join

to answer.
Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther