Generate a Gravatar avatar URL from an email address. Use when the user asks for a Gravatar URL, wants to generate an avatar from an email, or needs profile image URLs for developers.
Generate a Gravatar avatar URL from an email address.
npx tsx scripts/url.ts <email> [options]
| Argument | Required | Description |
|---|---|---|
email |
Yes | Email address |
| Option | Description |
|---|---|
--size=N |
Image size in pixels (default: 80, max: 2048) |
--default=TYPE |
Default image type: mp, identicon, monsterid, wavatar, retro, robohash, blank (default: mp) |
--rating=LEVEL |
Rating level: g, pg, r, x (default: g) |
--force-default |
Force the default image even if user has a Gravatar |
Email: user@example.com
Hash: b48bf4373d7b7374351c0544f36f7fc3
URL: https://www.gravatar.com/avatar/b48bf4373d7b7374351c0544f36f7fc3?s=80&d=mp&r=g
npx tsx scripts/url.ts <email> [options]
Options:
--size=N - Image size in pixels (default: 80, max: 2048)--default=TYPE - Default image type: mp, identicon, monsterid, wavatar, retro, robohash, blank (default: mp)--rating=LEVEL - Rating level: g, pg, r, x (default: g)--force-default - Force the default image even if user has a GravatarRun from the gravatar plugin directory: ~/.claude/plugins/cache/gravatar/
https://www.gravatar.com/avatar/{hash}?{parameters}
The hash is an MD5 hash of the lowercase, trimmed email address.
| Parameter | Description | Default | Options |
|---|---|---|---|
size |
Image size in pixels | 80 | 1-2048 |
default |
Default image when no Gravatar exists | mp | mp, identicon, monsterid, wavatar, retro, robohash, blank |
rating |
Content rating level | g | g, pg, r, x |
f |
Force default image | y (forced) | y |
| Type | Description |
|---|---|
mp |
Mystery Person (simple, cartoon-style silhouette) |
identicon |
Geometric pattern based on email hash |
monsterid |
Unique monster generated from email hash |
wavatar |
Unique face generated from email hash |
retro |
8-bit arcade-style face |
robohash |
Unique robot generated from email hash |
blank |
Transparent PNG |
| Rating | Description |
|---|---|
g |
Suitable for all audiences |
pg |
May contain rude gestures or mild violence |
r |
May contain harsh language, violence, or partial nudity |
x |
May contain explicit content |
Basic Gravatar URL:
npx tsx scripts/url.ts user@example.com
Custom size (200px):
npx tsx scripts/url.ts user@example.com --size=200
Use identicon for default:
npx tsx scripts/url.ts user@example.com --default=identicon
Force default image (ignore user's Gravatar):
npx tsx scripts/url.ts user@example.com --force-default --default=robohash
Gravatar uses MD5 hash of the email address:
Example:
Email: User@Example.COM
Step 1: user@example.com
Step 2: b48bf4373d7b7374351c0544f36f7fc3 (MD5)
URL: https://www.gravatar.com/avatar/b48bf4373d7b7374351c0544f36f7fc3
Gravatar also provides profile pages:
https://www.gravatar.com/{hash}
Replace /avatar/ with just the hash to get the profile page, which may contain additional information about the user.
gravatar-check skill to verify if a Gravatar exists for an emailgravatar-download skill to download Gravatar images to local filesGenerate avatar URLs for package maintainers:
npx tsx scripts/url.ts maintainer@npmjs.com
Create consistent avatars for team members:
npx tsx scripts/url.ts dev1@company.com --default=identicon --size=200
npx tsx scripts/url.ts dev2@company.com --default=identicon --size=200
Display avatars for user comments:
npx tsx scripts/url.ts commenter@example.com --rating=pg