Episode 6: Gravatars
A simple model accessor allows us to access or generate the user profile image using a Gravatar.
Everyone likes a nice clean profile, and when you view a list of users it's good to be able to see their photos or some graphic that makes it easier to spot a specific person in a list.
We utilise the Gravatar API to access a user's gravatar (either a photo they uploaded or a generated image based on their email address).
Tools and Resources Mentioned
- 0:01:00 – Recap of previous episode
- 0:02:00 – Gravatar introduction
- 0:03:50 – Generating a Gravatar Hash
- 0:07:00 – Changing the default placeholder if no avatar exists
- 0:11:50 – Abstracting the behaviour on the model for different sizes
- 0:15:20 – Cleaning up the User model
- 0:22:30 – Review and recap on this episode