WordPress

Force HTTPs Gravatar – WordPress

This is my informative post and will help to use Force HTTPs Gravatar in WordPress. Recently I faced one issue with my gravatar image it was not loading because gravatar url is HTTP but my whole site is on HTTPS that’s why gravatar images was blocking.

WordPress community run the gravatar website and it is website. It help to create a profile and associate avatar images to the email address.

I think there are lots of websites that are over https and they are using gravatar to display profile images.

If you are facing the same issue, you can fix this adding some below code in your functions.php file. So lets start to force gravatar url to https.

Find your functions.php file in WordPress Deshboard.

Force HTTPs Gravatar

Login to your WordPress go to left side click on Appearance –> Theme Editor.

Theme Editor

Now on the right side click on function.php.

function.php

Let’s add the below code in this function.php file.

add_filter('get_avatar_url', 'set_https', 10, 3);
function set_https($url, $id_or_email, $args){
return set_url_scheme( $url, 'https' );;
}

Save and exit.

FAQs

What is Gravatar?

Gravatar is a website and it is web service run by WordPress community. It help to create a profile and associate avatar images to the email address.

What is the Purpose of Gravatar in WordPress?

Basically, Gravart means Globally Recognized Avatar. It is a web service run by WordPress. It help users to upload online images associate avatar with their email.

How do I disable Gravatar in WordPress?

To disable Gravatar, login to your WordPress go to Setting –> Discussion now scroll down and find the Avatar Section and uncheck the box. Next ‘Show Avatars’ options. Now save the changes and exit.

Thank you! for visiting LookLinux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at LookLinux Submit Article. Stay connected to Facebook.

About the author

mm

Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment