As you all know, WordPress blog is among the best blogging platform. WordPress has a default gravatar for people on my blog that do not have their own gravatar.
Just in case if you want to change default Gravatar on your blog then simply follow below steps.
Step-1.
Open your theme’s functions.php
file.
Step-2.
Add below code at the end of file.
add_filter( 'avatar_defaults', 'crunchifygravatar' ); function crunchifygravatar ($avatar_defaults) { $myavatar = get_bloginfo('template_directory') . '/images/avatar.png'; // OR --> $myavatar = "https://crunchify.com/Crunchify.png"; $avatar_defaults[$myavatar] = "Crunchify Avatar"; return $avatar_defaults; }
Step-3.
Head over to Settings -> Discussion -> Default Avatar
Section.
Step-4.
Select your new avatar and click Save Changes.