📜  获取 gravatar javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:00.488000             🧑  作者: Mango

代码示例1
//--------------------------------------------------------
// Get Gravatar Image from Email
// npm install crypto-js
//--------------------------------------------------------
import md5 from 'crypto-js/md5';

const email  = "youremail@gmail.com";
const URL    = 'http://www.gravatar.com/avatar/';
const imgSrc = URL + md5(email).toString() + '.jpg?s=256';
//--------------------------------------------------------