: Serve gravatar extenerally? Microsoft on their website seems to get the avatar server side, and then serve it as an image from their servers. IE: <img src="avatar.jpg?username=Tom" /> I
Microsoft on their website seems to get the avatar server side, and then serve it as an image from their servers. IE:
<img src="avatar.jpg?username=Tom" />
I currently just link directly to Gravatar in the image tag itself.
<img src="http://www.gravatar.com/hash?=etc" />
Is there an advantage as acting as a proxy and serving them? Would you come up in image searches a lot?
More posts by @Moriarity557
5 Comments
Sorted by latest first Latest Oldest Best
I've found out why during development of my new site.
If gravatar fails, it can cause the page to constantly load, which annoyingly in IE seems to stop JS files that are after them in code from loading (they are waiting for the images to load).
So if Gravatar is down, running slowly, then the site will suffer a lot.
A snippet of Advanced Gravatars:
Since Gravatar is serving the images
instead of you, the image load time is
out of your hands. Like a lot of good
internet services, Gravatar slowed way
down as it got more popular. A major
update came out earlier this year (2007)
which greatly improved scalability.
For instance, right when you upload an
image, it's scaled to all possible
sizes - from 1x1 to 80x80 - and
mirrored to two Amazon S3 servers.
Despite all that, though, it ran a bit
slow in some of my tests.
The post briefly discusses various approaches and references many real world examples.
Implementing a custom handler allows you to not show any external links for gravatars, but you can still decide where to get the images, with or without using a local cache to improve performance.
There are code samples (ASP.NET) and references for simple caching/reluctant caching/etc., that helped me implement my own version of a caching gravatar handler.
Also they can include them on SSL protected pages without them coming from a 3rd party site which is a trust issue.
I'd say the main advantage is that they aren't reliant on Gravatar for the page to work. I.e. if Gravatar was down for some reason, users wouldn't see errors or broken image links all over the page.
Possible other advantages would be:
Speed - By hosting them MS can tweak things like expiry headers, serve them from their own CDN, and even go as far as to further optimise the image files in order to make their pages load faster
Control - if a user posted a porn image as their avatar MS have a little more power to change or censor it if they are hosting them
This doesn't make any difference for image search at all. Either an image is relevant for the search term or it isn't. Where it is hosted doesn't matter.
Image search is affected by other factors such as ALT text, text proximity, (if part of a hyper link) anchor text and/or keywords in the URL of the hyperlink, etc.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.