How to Add Post Profile Picture in WordPress Site
Do you know the Author Picture that shows up on your posts, but how do you change it? I spent days wondering through the menus, searching for a way to change it and I couldn’t, but instead I’ll show you how with one easy copy and paste inside the theme code you can add your photo and make it author’s avatar.
1. Make sure the option is enabled...
Go to your Dashboard > Settings and click on Discussion.
A new page will open. Scroll all the way down until you see the Avatar section and make sure the Avatar Display option Show Avatars is selected.
2.Time to add the Image...
After you make sure that this option is enabled, go to Settings, but this time you have to select Theme File Editor
A new page will open and a message will appear, accept it. On the right side of that page you will see Theme Files, select Theme Functions ( functions.php if not named )
You need to add the following code:
add_filter( ‘avatar_defaults’, ‘wpb_new_profile_picture’ );
function wpb_new_profile_picture ($avatar_defaults) {
$myavatar = ‘your_picture_url_here’;
$avatar_defaults[$myavatar] = “Profile Picture”;
return $avatar_defaults;
}
You can select a Profile Picture by going to your Media library from the left side menu Media > Library . Select the Image you want to be your avatar, copy the link with the button Copy URL to the clipboard located on the right side under File URL or copy the image URL from the directory you want it doesn’t have to be uploaded to your website’s media library.When you insert the correct URL, click the Update File button to save the changes
To make sure you did everything correctly and to select the Image to be your Avatargo back to Settings > Discussion and again scroll down to Avatar.
When you get there at the bottom of the list you should see the image we just added. Select it and click Save Changes.
3.You made it!
That’s all! Now when you open and article the image you just selected should be shown as Author Avatar.