Websites & Apps

{"type":"PARAGRAPH"

DROPIDEA By Admin
May 31, 2025 6 views
DROPIDEA | دروب ايديا - {"type":"PARAGRAPH"

If you are the owner of a website, blog, or store on WordPress, it is preferable to start using avatar images known as (Gravatar), as these images create a virtual icon that appears next to the names of users who write comments or publish posts on the website. You can use the Gravatar avatar service, which we will explain in today’s article, to create your own avatar to appear in specific places within your site and in all of your comments and posts in various WordPress blogs and websites. You can also activate the display of avatar images for all users on your WordPress site, as this image will appear next to the user name when he writes comments or posts on your site.

In this article, you will learn how to deal with the concept of a Gravatar, and how you can add or change it to your WordPress site in easy and simple steps. The concept of Gravatar Gravatar is a free web service for avatars. Created and operated by Matt Mullenweg.

It allows anyone to create a personal profile and an avatar for themselves through this service, and link these avatars to their email address. The word Gravatar is an abbreviation for the phrase “Globally Recognized Avatar,” which means a globally recognized avatar, which is the image used to represent you in the Internet world and which will appear next to your name when you interact with any site that supports this service. Thus, you will only need to upload your public profile picture once, and after that, when you participate in any site - that supports the Gravatar service - your profile and public avatar will be automatically attached there to express your personal identity.

Previously, users had to register in forums or blogs to be allowed to comment and participate. Thus, the user had a personal profile for each site on which he registered an account, and he could put his photo or icon in this profile. Today, most sites enable you to write comments or other contributions without you logging in, and identify you only by your email.

What is the role of Gravatar, and why should you use it? The Gravatar service is implicitly integrated into many global applications and platforms, including WordPress. For example, if you select your Gravatar image, and then go to any WordPress site and write a comment, you will notice that your Gravatar image will automatically be pulled, and this image will appear next to your username.

Therefore, it is preferable to start using Gravatar if you want to have an identity that distinguishes you, enhances your presence in the web world, and helps you build a better relationship with other users. How do you create a Gravatar image and link it to your account? If the user does not have a Gravatar image, WordPress will automatically show the default Gravatar image. If you do not want to use the default Gravatar image, you can change it to your image or the icon that represents you, as we will explain in the following lines.

You can create your own Gravatar image, and link it to the email you want, so that the image will be used automatically as soon as you register on a site or comment on a site with the same email, by following the following steps: Go to the official website of the service. Then register and create a new account on the site, using the email you use frequently. After that, you can log in to your personal account and enter the information you want to associate with the email (such as name, bio), etc., as well as upload and select the Gravatar image you want.

After that, when you use the email, the image and information you entered will be automatically used where users leave their comments or posts. All WordPress sites come with Gravatars built-in and automatically display user avatars. The default Gravatar image in WordPress can easily be changed in several ways, whether in the control panel itself, through custom code, or using the WP User Avatar plugin.

Let us now explain these methods as follows: 1- Change the default Gravatar image through the WordPress control panel. From within the WordPress control panel for your site, you can change the default avatar used for members who do not have their own avatar. WordPress gives you the option to display a general avatar for all of these members, or display a unique avatar based on their email addresses. This is done through the control panel and then going to settings < المناقشة.

Then you can scroll down to see the options available for your default avatar. You can choose from the existing images and press Save Changes, as shown in the following image: In this method, you do not have many options. Likewise, you cannot add images customized for you. However, if you need to add a specific image that you have on your computer and want to upload it to become your avatar, you can do so by adding a special code to your WordPress files, as we will explain in the following paragraph.

2- Use the code to change the Gravatar image. If you want to add custom avatars and then upload them to your site, you must do the following. First, you must upload the images to your WordPress site by going to Media > Add New > then dragging or selecting the files to upload. Note: The dimensions of the images must be square, for example (250*250). After that, you must click Edit. To edit and modify the image, a new window will open for you. You must copy the URL file link from it as it is. Shown in the following image. Next, you will have to add code inside the functions.php file in WordPress. This is a theme function file and is mainly used to add new features or modify the default features in a WordPress site.

Note: If you do not have sufficient programming experience, it is preferable not to follow this method and go directly to method No. 3, which relies on adding (WP User Avatar), because any error in writing the code in the functions.php file may cause your WordPress site to crash. It is also preferable to make a backup copy of your site before making the modification, to restore it in the event of any errors in modifying the code. To find this file you have to go to Appearance< محرر القوالب< ثم البحث عن الملف functions.php قم بفتح الملف وابحث عن تعريف المتغير myavatar داخل الملف كما هو مبين في الصورة التالية: هنا يجب عليك الانتباه وتبديل قيمة المتغير myavatar بقيمة الرابط السابق -الموجود ضمن المربع الأحمر- برابط الملف الجديد الذي قمت بنسخه في الخطوة السابقة (أي رابط الصورة الجديدة).

The code becomes as follows: If the variable does not exist, declare it manually by editing the file and adding the following code before the closing bracket { at the end of the file: add_filter( 'avatar_defaults', 'wpb_new_gravatar' ); function wpb_new_gravatar ($avatar_defaults) { $myavatar=’http://test.default.org/wp-content/uploads/2021/05/gravatar-icon1.jpeg’; $avatar_defaults[$myavatar] = "Custom Gravatar"; return $avatar_defaults; After adding the required code into the functions.php file, as shown in the following image, click the Update File button. After that you can go back to settings< مناقشة ، لتجد الصورة الجديدة التي قمت بإضافتها حيث يمكنك الآن تحديدها كصورة رمزية افتراضية اقرأ أيضاً: كيفية إضافة كود PHP في موقعك الووردبريس دون تعديل الكود المصدري 3- استخدام إضافة WP User Avatar لتغيير الصور الرمزية تتيح لك إضافة WP User Avatar ، إمكانية تعيين أي صورة تريدها كصورة رمزية افتراضية، كذلك تمكنك من رفع وتحميل الصور الرمزية التي تريدها. النسخة المجانية من الإضافة مناسبة وتفي بالغرض، ولكن النسخة المدفوعة تأتي بالمزيد من الخيارات (مثل إمكانية استخدام كاميرا الويب لالتقاط الصور الرمزية).

You can download the add-on by going to Add-ons< أضف جديد وكتابة WP User Avatar في خانة البحث ، ثم الضغط على زر تنصيب الآن بعدها قم بالضغط على زر تفعيل ، لتفعيل الإضافة في موقعك. للاطلاع على مزيد من المعلومات حول طريقة تنصيب الإضافة، أنصحك بقراءة المقال التالي: تنصيب إضافة الووردبريس ب الشكل الصحيح.بمجرد تفعيل الإضافة، يمكنك الذهاب إلى الإعدادات< مناقشة ، وستلاحظ أنه تم إضافة زر باسم Choose Image ، يمكنك النقر علية لإضافة ورفع الصور الرمزية التي تريدها للموقع. فعند الضغط على الزر Choose Image ستفتح لك نافذة مكتبة الوسائط.

You can choose an image from the media library or go to the Upload Files tab to upload a new image from your device, for example. The image will be downloaded and set as the default image. Select the image you want and then click the Save Changes button. You will notice that your profile avatar has changed.

Now that you have selected the Gravatar image, WordPress will set this image as the default for all users who have not linked the Gravatar to their email addresses. To try this, you can go to your site and try writing a comment, and you will see how the Gravatar image you chose in the previous step will be linked to your comment. In the end, the process of changing the default Gravatar image in WordPress is an easy and simple process, and you can do it in simple ways even if you do not have technical or programming experience.

Today's article has shown you three options available to change the image. You can change the image and choose a new image from among the available images, or you can upload a new image and add it to your site manually by modifying the code if you have programming information, or you can use the WP User Avatar add-on to upload and set your own avatars easily and without modifying any software codes. Choose one method that suits you and start applying it to your site.

DROPIDEA

We hope this article has added real value to you. At DROPIDEA, we always strive to deliver high-quality content that helps you grow and evolve in the digital space. Follow us for more useful articles and guides.

Share Article