Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

give-me-an-avatar

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

give-me-an-avatar

Gets a random avatar URL from a collection of different avatar generation services.

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

Give Me an Avatar

Gets a random avatar URL from a collection of different avatar generation services.

Build status Azure DevOps tests Quality Gate Status Maintainability Rating MIT License npm

Usage

After installing, simply import Give Me an Avatar in your file.

const avatars = require("give-me-an-avatar");

Consume the giveMeAnAvatar() API to get an avatar URL that you can use directly as an image. You can either call the method directly or supply the settings object to customize your avatar (only a bit). All settings are pretty self-explanatory and are not mandatory. For example:

let image = avatars.giveMeAnAvatar({
            Name: "John Smith",
            Size: 128
        }); 

The image variable will have the avatar image URL.

Supported avatar services

ServiceAvatar example
placeholder.comimage
placeimg.comimage
placekitten.comimage
dummyimage.comimage
loremflickr.comimage
baconmockup.comimage
placebeard.itimage
fakeimg.plimage
thispersondoesnotexist.com
picsum.photosimage
fillmurray.comimage
placecage.comimage
stevensegallery.comimage
gravatar.comimage
ui-avatars.comimage
generative-placeholders.glitch.meimage
robohash.orgimage image image image
avatars.dicebear.comimage image image image image image
avatar.uimaterial.comimage image image image

I'm not using avataaars separately since avatars.dicebear.com includes avataaars.

Credits

All the avatar services used in this npm package are outlined in the table above. This NPM package is developed by Clyde D'Souza.

Keywords

FAQs

Package last updated on 15 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc