Replace the default Gravatar avatar source address

Original link: https://yunfanch.com/website/1943.html

62b0723f09475431293fc7d7.png

What is Gravatar’s avatar?

Gravatar is the abbreviation of Globally Recognized Avatar, which is a service launched by gravatar, which means “global universal avatar”. If you have placed your own avatar on Gravatar’s server, then when you leave a message on any blog or guestbook that supports Gravatar, you can display your Gravatar avatar as long as you provide the email address associated with this avatar.

The loading of the comment avatar slows down the speed of the web page. Since the default avatar address is relatively slow, it can be replaced with a faster cdn acceleration address.

Modification method

Modify the /var/Typecho/Common.php file, comment out lines 937 and 938, and add a line

 937 //$url = $isSecure ? 'https://secure.gravatar.com' : 'http://www.gravatar.com'; 938 $url = $isSecure ? 'https://gravatar.loli.net' : 'https://sdn.geekzu.org/avatar/'; 939 $url .= '/avatar/';

Other accelerated addresses
 https://gravatar.loli.net/avatar/ https://sdn.geekzu.org/avatar/ https://avatar.zrahh.com/avatar/ https://sdn.geekzu.org/avatar/ https://cdn.v2ex.com/gravatar/

2022-06-30 The test is also unstable and cannot be used occasionally. It is recommended to use Cravatar

This article is reprinted from: https://yunfanch.com/website/1943.html
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment