My goal is to display an avatar instead of the username when signed in, like this:
This, it would seem, is a fairly common pattern, but I have not been able to locate an easy way to do it.
Test app
I have posted a test app at https://github.com/andersr/meteor-avatar-test In the test app, the avatar displays in the header, but is not integrated with LoginButtons.
Packages I’m using
⚡ meteor list
accounts-github 1.0.4 Login service for Github accounts
accounts-google 1.0.4 Login service for Google accounts
accounts-password 1.1.1 Password support for accounts
autopublish 1.0.3 Publish the entire database to all clients
ian:accounts-ui-bootstrap-3 1.2.79 Bootstrap-styled accounts-ui with multi-language support.
insecure 1.0.3 Allow all database writes by default
meteor-platform 1.2.2 Include a standard set of Meteor packages in your app
reactive-var 1.0.5 Reactive variable
twbs:bootstrap 3.3.5 The most popular front-end framework for developing responsive, mobile first projects on the web.
utilities:avatar 0.9.0 Consolidated user avatar template (twitter, facebook, gravatar, etc.)
Customize meteor-accounts-ui-bootstrap?
Looking at the source for meteor-accounts-ui-bootstrap-3, it appears there is an option for including a user profile picture:
<template name="_loginButtonsLoggedInDropdown">
<li id="login-dropdown-list" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown">
{{displayName}}
<!-- how can I make use of this? -->
{{#with user_profile_picture}}
<img src="{{this}}" width="30px" height="30px" class="img-circle" alt="#" />
{{/with}}
<b class="caret"></b>
</a>
<div class="dropdown-menu">
{{#if inMessageOnlyFlow}}
{{> _loginButtonsMessages}}
{{else}}
{{#if inChangePasswordFlow}}
{{> _loginButtonsChangePassword}}
{{else}}
{{> _loginButtonsLoggedInDropdownActions}}
{{/if}}
{{/if}}
</div>
</li>
</template>
However, I have not been able to locate any documentation on how to do that.
Any tips on how to display an avatar instead of the username would be appreciated!