Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
gravatar-url
Advanced tools
Get the URL to a Gravatar image from an identifier, such as an email
Get the URL to a Gravatar image from an identifier, such as an email
$ npm install gravatar-url
import gravatarUrl from 'gravatar-url';
gravatarUrl('sindresorhus@gmail.com', {size: 200});
//=> 'https://gravatar.com/avatar/d36a92237c75c5337c17b60d90686bf9?size=200'
Type: string
Identifier for which to get the Gravatar image.
This will typically be an email matching a Gravatar profile, but can technically be any string.
The Gravatar service only sees a hash of the identifier, so you could actually use this to get pseudo-random avatars for any entity, e.g. based on its ID.
Note that if the identifier contains an @
, it is assumed to be an email, and will therefore be lower-cased and trimmed before hashing, as per the Gravatar instructions - otherwise it will be hashed as-is.
Type: object
Type: number
Default: 80
Values: 1..2048
Size of the image.
Type: string
Default: This image
Values: Custom URL or 404
, mm
, identicon
, monsterid
, wavatar
, retro
, blank
Image to return if the identifier didn't match any Gravatar profile.
Type: string
Default: g
Values: g
pg
r
x
Allowed rating of the image.
FAQs
Get the URL to a Gravatar image from an identifier, such as an email
The npm package gravatar-url receives a total of 18,597 weekly downloads. As such, gravatar-url popularity was classified as popular.
We found that gravatar-url demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.