libravatar
v3.0.0
Published
Libravatar Node.js library
Downloads
116
Readme
node-libravatar
A library intended for integrating with the federated Libravatar avatar hosting service from within your Node.js applications. The project was inspired by a Gravatar library from Emerson Macedo.
See the project page for the issue tracker and downloads.
Installation
To install using npm:
$ npm install libravatar
Usage
To generate the correct avatar URL based on someone's email address, use the following:
const libravatar = require('libravatar');
...
const get_libravatar_url = async () => {
const avatar_url = await libravatar.get_avatar_url({ email: '[email protected]', size: 96, default: 'mm', https: false });
}
See the Libravatar documentation for more information on the special values for the "default" parameter.