Sélectionner une page

How to Change the Default WordPress Avatar

How to Change the Default WordPress Avatar

Most WordPress websites display avatars for user’s images. These avatars can be images the user themselves have chosen or they can be assigned by the website owner or by WordPress. The default avatar is a shape resembling a person on a gray background. To be honest it’s boring. Fortunately we can easily change the default WordPress avatar.

In this tutorial we’ll see how to do just that. We’ll also see how to choose your own avatar and how to use plugins to allow your users to choose their own avatars. The only knowledge required is very basic – how to install a plugin, crop an image, and upload a file.

What is an Avatar?

WordPress defines an avatar as an image that appears next to your name when you comment on avatar enabled sites. They’re usually around 80×80 pixels and can be practically any file type, although PNG is popular.

Default Avatar Settings

We’ve all seen the mystery person avatar. It’s boring and reminds us that avatars are not set up for the website. Fortunately we’re not limited to the mystery person. With WordPress we have several choices.

You can choose the default avatar for anyone commenting on your site. There are several built-in choices and you can even add more. These are the avatars for anyone leaving comments as well as the users for your website (unless they specify one, as we’ll see later).

In the dashboard, go to Settings, Discussion, and scroll down to Avatars. Make sure Show Avatars is checked. Here you have seven built-in choices. Also choose the appropriate rating for your audience (g-x).

Mystery Person is the default. Four of the choices are generated. These use the commenter’s name or email address to mathematically generate an image according to the pattern you’ve chosen.

Select the avatar you want as default and click Save Changes.

The avatars on your website will then update to match your default selection.

Gravatar – Getting Your Own Custom Avatar

You’re not limited to the default avatars a website chooses- you can have your own. The most popular are provided by another Automattic company called Gravatar. Gravatar stands for Globally Recognized avatar. You create your profile in one location and then it will follow you to every Gravatar enabled website.

The advantage of having a Gravatar is one person can have an avatar that follows them across the web. How? They are tied to your email address. Any time you comment and use your email address your default avatar will be used. If you don’t have a default, or if you don’t include your email address, WordPress will assign a default avatar to your comment.

In the dashboard, go to Users, Your Profile, and scroll down to About Yourself. This shows your profile picture. Change this picture on the Gravatar website by clicking the link. You can also just go to Gravatar.com.

Create a Gravatar account (this is free), upload your image, and you’re done. You can have multiple emails with a different Gravatar for each. A square image around 250×250 is a good choice.

It even has a cropping tool with two previews to show you what the image looks like large and small. This creates a copy so your original image remains intact.

Once you’ve selected and cropped your image select the rating (g-x), choose the email to use it with and click the button. This avatar will now follow you anywhere that you use the email you’ve assigned it to that allows for Gravatars.

Refreshing my profile page on my website now shows my new Gravatar (a cropped version of my original – sorry for all the pics of me here).

Every website that displayed my old Gravatar now displays my new Gravatar. Here’s how it look within comments.

Plugins for Adding New Avatars

WordPress has lots of plugins available to customize and add new avatars. Here’s a quick look at some of the most popular.

Add New Default Avatar

Add New Default Avatar adds a field where you can link to images to be used as an avatar. Add as many avatars as you want and all of them will display in the list of options. You can even specify an image size for it to convert to image to. It provides examples of how to specify the URL with the image size.

Here’s the link field added to the default avatar selection screen. The new avatars are added to the bottom of the list of choices.

WP First Letter Avatar

WP First Letter Avatar creates an avatar using the first letter of the user’s name if they don’t have a Gravatar. Each letter has a different colored background. It includes multiple sizes and will automatically select the most appropriate size. You can even create your own avatar set and use the same naming rules. You can also turn off Gravatar if you want all users to have the letter avatars.

Here’s an example comment. This commenter’s name is Tester, so the avatar is a T.

Avatar Manager

Avatar Manager allows your registered users to upload their own avatars to be hosted on your website. The file upload is added to their user settings page. You can specify the default pixel sizes and set custom permissions. Users can choose to use their Gravatars or their uploaded avatars.

This image shows how easy it is to disable the Gravatar and upload a file using common controls we’ve seen on the web for years.

WP User Avatar

WP User Avatar adds a file upload feature to the avatar list and a library where you can see and manage the avatars that have been uploaded. Any images in your library can be used as an avatar. You can add upload shortcodes to widgets and posts so contributors and subscribers can add their own avatars. You can also set their file limits and disable Gravatar if you want more control.

The new avatar upload is added to the top of the avatar list. Click the button to upload a new image.

Basic User Avatars

Basic User Avatars add a file upload to the user’s profile page where they can upload their own avatars. You can set upload permissions to user of author-level and above if you want. It has a shortcode for frontend avatar management allowing users to upload through posts or widgets.

This one is a simple file upload button.

WP User Avatars

WP User Avatars adds an avatar file upload section to the user’s profile page, allowing users to upload and select their own avatars. It adds a set of options so you can select user roles that are allowed to upload avatars and to keep WordPress from contacting Gravatar for avatars so you can specify them yourself.

This one lets you upload or choose from the media library using the upload box in your user profile page.

Image Guidelines for Creating Your Own Avatars

Choose your image type and size based on the design and need. 128×128 will work fine for most images. You might consider 250×250 for images with more detail.

  • PNG is good for transparency and lots of color.
  • JPG is great for gradients such as photographs.
  • GIF is good for repetitive color such as line art, logos, and illustrations with text.

You might need to experiment to see what works best for your design but these simple guidelines will help get you in the ballpark.

Final Thoughts

Thanks to the features and vast library of WordPress plugins there are several options for changing the default WordPress avatar. You can create and upload them yourself, allow WordPress to generate them based on user names, even allow users to upload their own, or allow your readers to use their own Gravatars. No matter which method you choose there are enough options to make your website’s avatars what you want them to be.

Have you changed your default WordPress avatar? Let us know how you did it in the comments below.

Featured Image via PictureStudio / shutterstock.com

Source link

Poster le commentaire

Votre adresse e-mail ne sera pas publiée.