Have ideas to improve npm?Join in the discussion! »

    react-gravatar
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/react-gravatar package

    2.6.3 • Public • Published

    react-gravatar

    React component for rendering a gravatar profile image. Adjusts automatically to HiDPI displays.

    Demo

    http://kyleamathews.github.io/react-gravatar/

    Install

    npm install react-gravatar

    Usage

    See https://en.gravatar.com/site/implement/images/ for documentation on all the options.

    Avoid exposing email

    If you wish to avoid sending an email address to the client, you can compute the md5 hash on the server and pass the hash to the component using the md5 prop instead of the email prop.

    Defaults

    • 50x50 image
    • g rated photos
    • http
    • retro backup faces for emails without profiles
    • react-gravatar css class

    Use defaults

    <Gravatar email="mathews.kyle@gmail.com" />

    Override all defaults

    <Gravatar email="mathews.kyle@gmail.com" size={100} rating="pg" default="monsterid" className="CustomAvatar-image" />

    Install

    npm i react-gravatar

    DownloadsWeekly Downloads

    27,583

    Version

    2.6.3

    License

    MIT

    Last publish

    Collaborators

    • avatar
    • avatar