Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to specify default value for Gravatar #156

Open
RafalSkorka opened this issue Sep 24, 2022 · 0 comments
Open

Add option to specify default value for Gravatar #156

RafalSkorka opened this issue Sep 24, 2022 · 0 comments

Comments

@RafalSkorka
Copy link

Hello,

Currently, when requesting for a Gravatar image, it always defaults to 404 response from the API. However, this doesn't look good when inspecting the Network dev tools and looking for failures. It would be excellent if there was an option to specify a value for the "default" (or "d") parameter for Gravatar as described here: http://en.gravatar.com/site/implement/images/ There are number of options allowed:

  • 404: do not load any image if none is associated with the email hash, instead return an HTTP 404 (File Not Found) response
  • mp: (mystery-person) a simple, cartoon-style silhouetted outline of a person (does not vary by email hash)
  • identicon: a geometric pattern based on an email hash
  • monsterid: a generated 'monster' with different colors, faces, etc
  • wavatar: generated faces with differing features and backgrounds
  • retro: awesome generated, 8-bit arcade-style pixelated faces
  • robohash: a generated robot with different colors, faces, etc
  • blank: a transparent PNG image (border added to HTML below for demonstration purposes)

The value is hardcoded to 404 here: https://github.com/HaithemMosbahi/ngx-avatar/blob/master/projects/ngx-avatar/src/lib/sources/gravatar.ts#L38

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant