惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

Gravatar – 百品博客

暂无文章

Gravatar个人注册与网站加速调用 - 百品博客
MX文章作者勇敢打破裂缝,阳光就会洒满其中。 · 2026-06-01 · via Gravatar – 百品博客

有关Gravatar在大陆地区的调用方法,请直接移步“大陆地区调用”章节

什么是Gravatar?

Gravatar(Globally Recognized Avatar的缩写,词典释义“全球个人统一头像”),简单来说就是一个托管头像的平台。在这个网站用邮箱注册,上传好头像后,在所有支持Gravatar的网站(例如Github,本站等)上填写邮箱地址并留言时,系统会自动根据您的邮箱地址获取头像。

注册Gravatar

打开http://cn.gravatar.org/(大陆间歇性打不开),点击“创建您自己的Gravatar”,填写信息,提交,去邮箱里确认。

  • https://www.baipin.pw/wp-content/uploads/2021/05/Screenshot_20210529_191908-795x1024.jpg
    步骤1.1
  • https://www.baipin.pw/wp-content/uploads/2021/05/Screenshot_20210529_192233-640x1024.jpg
    步骤1.2
  • https://www.baipin.pw/wp-content/uploads/2021/05/Screenshot_20210529_192514-623x1024.jpg
    步骤1.3:已发送确认邮件

进入邮件里的链接,点击Add one by clicking here!

https://www.baipin.pw/wp-content/uploads/2021/05/Screenshot_20210529_193016-571x1024.jpg

按要求上传头像,最后一步,选择分级。如果没有少儿不宜/攻击性的内容,则选择"G"级(该图像适合在具有任何受众类型的所有网站上显示),点击Get Rating即可。

https://www.baipin.pw/wp-content/uploads/2021/05/Screenshot_20210529_193512-565x1024.jpg
选择分级

大功告成。

大陆地区调用Gravatar

使用加速服务

最近,Gravatar也被GFW封禁,导致许多头像依赖Gravatar的大陆网站评论区“一片灰”。目前推荐的办法是套用CDN。以下以Wordpress为例,讲述应对方法。

这里博主选了极客族公共加速服务,详情可以查看:

https://cdn.geekzu.org/

部署

找到主题的functions.php文件,添加以下代码:

function mytheme_get_avatar( $avatar ) {
    $avatar = str_replace(array("www.gravatar.com","0.gravatar.com","1.gravatar.com","2.gravatar.com","secure.gravatar.com"),"sdn.geekzu.org",$avatar );
return $avatar;
}
add_filter( 'get_avatar', 'mytheme_get_avatar' );//调用Gravatar加速

还有别的加速服务可以选择,部署时把网址换掉即可。

若是单独网页,只需将所有//*.gravatar.com/avatar/替换为://sdn.geekzu.org/avatar/(cdn地址)即可。

调用SSL

据说https协议还没有被封,也可找到主题的functions.php文件,添加以下代码:(博主没试过)

function get_ssl_avatar($avatar) {    
$avatar = preg_replace('/.*\/avatar\/(.*)\?s=([\d]+)&.*/','<img src="https://secure.gravatar.com/avatar/$1?s=$2" class="avatar avatar-$2" height="$2" width="$2">',$avatar);    
return $avatar; } add_filter('get_avatar', 'get_ssl_avatar');//SSL法调用Gravatar加速