WordPress Avatar does not display and slow down the site solution

Source: Internet
Author: User

  1. I. Past Solutions

    Before the Gravatar is not fully coordinated, you can modify the WordPress call Avatar Server resolution, and now invalid. Slow, can be cached avatar, now also invalid. The other is to close the avatar, but for the site needs to display the avatar, a bit regrettable. So these methods are not perfect. The following method is provided by the plugin to solve.

  2. Second, WP User avatar plugin to solve the avatar problem

    WP User Avatar This plugin allows users to use images from the Media Library as avatars, while providing the ability to turn off Gravatar. This is a free plug-in, you can in the WordPress background plug-in search for installation. The following author uses the Chinese version of this site to explain the use of the version.

    1, first install WP User AVATAR and activate this plugin.

    You will see an avatar menu in the WordPress menu. Then click Set:

  3. 2, set WP User AVATAR

    First we want to close the Gravatar avatar, and check the display avatar, if you allow contributors and subscribers to upload Avatar, also check. After checking, you will also be allowed to upload avatar size settings. Such as:

  4. 3. How users upload their avatar

    In the background point user-my profile, then you can see the upload avatar.

  5. Third, the Gravatar server was wall, you can change to say, open the functions.php file, copy the following code to the top of the file, note after the first <?php

  6. Say more official Gravatar Avatar call

    function Mytheme_get_avatar ($avatar) {

    $avatar = Str_replace (Array ("www.gravatar.com", "0.gravatar.com", "1.gravatar.com", "2.gravatar.com"), " Gravatar.duoshuo.com ", $avatar);

    return $avatar;

    }

    Add_filter (' Get_avatar ', ' Mytheme_get_avatar ', 10, 3);

  7. 7

    Then we visit the website, the message operation, the avatar will naturally become more said to provide the Avatar



WordPress Avatar does not display and slow down the site solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.