mirror of
https://github.com/soconnor0919/beenvoice.git
synced 2026-02-05 08:16:31 -05:00
8 lines
296 B
TypeScript
8 lines
296 B
TypeScript
import { createHash } from "crypto";
|
|
|
|
export function getGravatarUrl(email: string, size = 200) {
|
|
const trimmedEmail = email.trim().toLowerCase();
|
|
const hash = createHash("sha256").update(trimmedEmail).digest("hex");
|
|
return `https://www.gravatar.com/avatar/${hash}?s=${size}&d=mp`;
|
|
}
|