1.安裝模塊javascript
npm install gravatar --save
2.使用java
根目錄/routes/api/users.jsnpm
const gravatar = require('gravatar'); ... const avatar = gravatar.url(ctx.request.body.email, { s: '200', r: 'pg', d: 'mm' });
3.登陸官網上傳頭像api
https://en.gravatar.com/ui
4.效果圖url
.blog