bengott/meteor-avatar

00000000 list

Closed this issue · 5 comments

Im getting this weird issue with 0.6.0

http://www.gravatar.com/avatar/00000000000000000000000000000000?default=404&size=200

in the logs,

with default setup :

  Avatar.options =
    defaultImageUrl: "user-default.png"
    gravatarDefault: "user-default.png"

when specifying defaultType : image

  Avatar.options =
    defaultType: 'image'
    defaultImageUrl: "user-default.png"
    gravatarDefault: "user-default.png"

i get http://i0.wp.com/localhost/user-default.png

i just have no idea of where this could be coming from! thanks! :)

All by design as far as I can tell. Not the best design, mind you, but I digress. ;)

Reread the README carefully -- breaking changes abound. That i0.wp.com URL is a caching server that gravatar uses. Gravatar's default option requires a publicly accessible URL, so that's why it gets borked when you're running on localhost and using a relative URL for the default image.

Also check out @erasaur's PR #20 that aims to clean up some of the overly complex logic and the hacky 32 zeros "trash hash" I created.

cool thanks for the answer.

but the fallback to just a default image provided seems to be broken.

eg: i dont want to use initials and just provide a fallback image from
public/

this doesnt seem to be working anymore?

On 26 November 2014 at 08:47, Ben Gott notifications@github.com wrote:

All by design as far as I can tell. Not the best design, mind you, but I
digress. ;)

Reread the README carefully -- breaking changes abound. That i0.wp.com
URL is a caching server that gravatar uses. Gravatar's default option
requires a publicly accessible URL, so that's why it gets borked when
you're running on localhost and using a relative URL for the default image.

Also check out @erasaur https://github.com/erasaur's PR #20
#20 that aims to clean up
some of the overly complex logic and the hacky 32 zeros "trash hash" I
created.


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

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

gravatarDefault takes precedence over defaultImageUrl (in version 0.6.0 at least), so make sure you're not setting that option.

Your config setup should be:

Avatar.options =
    defaultType: 'image'
    defaultImageUrl: 'user-default.png'

Keep in mind that because gravatar requires a publicly-available URL for that fallback image, the above options will fail when you're running on localhost, but it should be fine once deployed. You can test that things are behaving as expected by substituting in a non-relative public image URL for the defaultImageUrl option. (like this one, for example: https://raw.githubusercontent.com/bengott/meteor-avatar/master/default.png).

Hope that solves your problem..

Okay brilliant!

Yeah it just wasnt clear at all from the docs. thanks for the help!

Great package btw :)

On 26 November 2014 at 18:26, Ben Gott notifications@github.com wrote:

gravatarDefault takes precedence over defaultImageUrl (in version 0.6.0 at
least), so make sure you're not setting that option.

Your config setup should be:

Avatar.options =
defaultType: 'image'
defaultImageUrl: 'user-default.png'

Keep in mind that because gravatar requires a publicly-available URL for
that fallback image, the above options will fail when you're running on
localhost, but it should be fine once deployed. You can test that things
are behaving as expected by substituting in a non-relative public image URL
for the defaultImageUrl option. (like this one, for example:
https://raw.githubusercontent.com/bengott/meteor-avatar/master/default.png
).

Hope that solves your problem..


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

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

I updated the README with better usage examples -- should be more clear now. Let me know if it's not.