bengott/meteor-avatar

Suggestion : Fallback default avatar

Closed this issue · 7 comments

Hey Ben!
Looks like an awesome package!!

It would be cool to have a default fallback image call in your helper in case none of the services provide one for the user ( in the case for example he signs up with email and doesnt have a gravatar)

for example:
{{> avatar fallback="default-img.png"}}

what do you think?

You probably don't want to indicate a different fallback anytime you call this avatar helper. This is more like a global configuration.

Yes at first I thought the same, through a global config , but maybe it
would be a good idea in some use cases ,

let's say depending on roles : default admin, default user.

Probably something global that you could then override in the helper if you
wish so

On 30 September 2014 14:24, Maxime Quandalle notifications@github.com
wrote:

You probably don't want to indicate a different fallback anytime you call
this avatar helper. This is more like a global configuration.


Reply to this email directly or view it on GitHub
#1 (comment).

Kevin O'Hagan
@kevohagan
+0034685245319
Palma de Mallorca,
Spain

default avatar
Currently, it falls back to the above image, default.png, if no other avatars are available.

Regarding config options, I'm in the process of making some changes to get the package working with Telescope, and config options are coming as part of that. Maybe some of your suggestions could be implemented in the future. PRs are welcome. :)

Maybe both? Let the package user set the global image but allow for helper fallback as an override. This way you don't have to specify for normal users but for cases like admin you can.

Hey, thanks for all the work on this! I have a definite need for customizing the default image (https://en.gravatar.com/site/implement/images/#default-image). At the very least, just passing that blank gravatar option in. As an example, you can see how I was using the previous version in Telescope. http://welder-wire.meteor.com/users/tester3

Thanks!

PR #5 from @edsadr added default avatar URL override, and my changes tweaked it a little bit. Closing this issue...