Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Go: Building Web Applications

You're reading from   Go: Building Web Applications Building Web Applications

Arrow left icon
Product type Course
Published in Aug 2016
Publisher Packt
ISBN-13 9781787123496
Length 665 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Nathan Kozyra Nathan Kozyra
Author Profile Icon Nathan Kozyra
Nathan Kozyra
Mat Ryer Mat Ryer
Author Profile Icon Mat Ryer
Mat Ryer
Arrow right icon
View More author details
Toc

Chapter 3. Three Ways to Implement Profile Pictures

So far, our chat application has made use of the OAuth2 protocol to allow users to sign in to our application so that we know who is saying what. In this chapter, we are going to add profile pictures to make the chatting experience more engaging.

We will look at the following ways to add pictures or avatars alongside the messages in our application:

  • Using the avatar picture provided by the authentication server
  • Using the Gravatar.com web service to look up a picture by the user's e-mail address
  • Allowing the user to upload their own picture and host it themselves

The first two options allow us to delegate the hosting of pictures to a third party—either an authentication service or Gravatar.com—which is great because it reduces the cost of hosting our application (in terms of storage costs and bandwidth, since the user's browsers will actually download the pictures from the servers of the authenticating service...

You have been reading a chapter from
Go: Building Web Applications
Published in: Aug 2016
Publisher: Packt
ISBN-13: 9781787123496
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image