WordPressのGravatarsを無効化しますか?
WordPressでは、サードパーティのGravatarサービスを利用してユーザーのプロフィール写真を表示しています。これにより、ユーザーは異なるサイトで同じプロフィール写真を持つことができます。
Gravatarsは、特にWordPressのコメントにおいて非常に便利です。しかし、ユーザーによってはGravatarsをすべて使用したくない場合もあります。
この投稿では、WordPressのGravatarsを簡単に無効化する方法を紹介します。また、代わりにローカルアバターを使用する方法も紹介します。
なぜWordPressでグラビアを無効化するのか?
Gravatarは、ユーザーがWordPressサイトにプロフィール写真を追加し、インターネット上で使用できるようにするサードパーティのサービスです。
基本的にはアカウントを作成し、プロフィール写真をアップロードする。
その後、Gravatarをサポートしているサイトでそのメールアドレスを使用すると、自動的にGravatarサイトのプロフィール写真が表示されます。
さらに詳しく知りたい方は、Gravatarとは何か、なぜGravatarを使うべきなのかについての説明をご覧ください。
しかし、いくつかの理由からグラビアを使いたくないサイトオーナーもいるだろう。
例えば、サイトのパフォーマンスやスピードを向上させるためにオフにしたい場合があります。同様に、プライバシーの問題から Gravatar を使用したくないサイトオーナーもいるかもしれません。
ということで、WordPressのGravatarsを簡単に無効化する方法を見ていきましょう。Gravatarsを完全に無効化する方法と、ローカルアバターで置き換える方法を紹介します:
WordPressのグラビアを完全に無効化する方法
WordPressでは、サイト上のグラビアをカスタマイズしたり、オフにしたりするのがとても簡単です。
まず、あなたのサイトの管理エリアにログインし、設定 ” ディスカッションページに移動する必要があります。
ここから、「アバター」セクションまでスクロールダウンし、「アバターを表示」オプションの隣にあるボックスのチェックを外す必要があります。
変更を保存」ボタンをクリックして、設定を保存することを忘れないでください。
WordPressはサイト全体でGravatarsを無効化します。管理ツールバーには、Gravatar画像の代わりに一般的なユーザーアイコンが表示されます。
同様に、グラビアもコメントと一緒に表示されなくなります。
WordPress管理エリアのコメントページにアクセスすると、グラビアは表示されなくなります。
サイトのフロントエンドでも同じことが言える。
WordPressは、WordPressブログの投稿日やページの下にあるコメントエリアにGravatar画像を表示しないようにします。
WordPressでGravatarをローカルアバターに置き換える方法
ユーザーによっては、Gravatarを無効化しても投稿者プロフィールやその他の場所にプロフィール写真を表示したい場合があります。
これにより、WordPressのアバター機能を維持し、ユーザーが自分のプロフィール写真をアップロードできるようになります。同時に、Gravatarsを無効化し、あなたのサイトがGravatarサイトへリクエストするのを防ぎます。
そのためには、Simple Local Avatarsプラグインをインストールして有効化する必要があります。詳しくはWordPressプラグインのインストール方法をご覧ください。
有効化した後、設定 ” ディスカッションページにアクセスし、「ローカルアバターのみ」オプションの隣にあるチェックボックスをオンにする必要があります。
変更を保存」ボタンをクリックして、設定を保存することを忘れないでください。
プラグインはGravatar.comへのリクエストをブロックし、アバター機能を維持できるようになりました。
プロフィール写真をアップロードするには、ユーザー自身のプロフィールに画像を追加する必要があります。
ユーザー ” プロフィールページに移動するだけです。ここから、WordPressメディアライブラリから画像を使用するか、メディアライブラリにアップロードして新しい画像を追加することができます。
プロフィールの更新」ボタンをクリックして変更を保存することをお忘れなく。
WordPressでは、グラビアの代わりにカスタマイザーのプロフィール写真を使用するようになりました。すべての未登録ユーザーには、設定で設定した初期設定のアバター画像が表示されます。
すべての登録ユーザーに対して、WordPressはユーザーがアップロードしたカスタムアバター画像を使用します。ユーザーがカスタムのアバター画像をアップロードしていない場合、プラグインは初期設定のアバター画像を使用します。
ユーザーがローカルアバターを選択すると、プロフィールページにはメディアライブラリから別の画像を選択したり、ローカルアバターを削除したりするボタンが表示されます。
WordPressグラビアのベストガイド
Gravatars を無効化する方法とローカルアバターを追加する方法はお分かりいただけたと思いますので、WordPress で Gravatars やアバターを使用する他のチュートリアルもご覧ください:
- Gravatarとは何か?
- WordPressでユーザーメールからGravatarを表示する方法
- WordPressでGravatarの画像サイズを変更する方法
- WordPressで初期設定のGravatarを変更する方法(簡単チュートリアル)
- WordPressのコメントでGravatarsを遅延ロードする方法
- WordPress投稿に投稿者情報ボックスを追加する方法
WordPressでGravatarsを無効化する方法について、この投稿がお役に立てば幸いです。また、WordPress登録でユーザープロフィール欄を追加する方法や、WordPressページビルダープラグインの比較もご覧ください。
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Syed Balkhi says
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Jiří Vaněk says
I also banned gravatars only because I was trying to limit all wordpress functions that are not necessary and that have to download their resources from foreign servers. When I measured the speed of the site, a lot of these services slow down the loading of the site, and then one can very easily get worse numbers in the metrics.
Pradip Nalwaya says
It’s Very Useful For me at right now. Thank you !!
WPBeginner Support says
You’re welcome
管理者
Mike says
Agree with Dave:
Gravatar still calls home. You can see this when you use Ghostery – and a Gravatar tracker is still active. This does not comply with GDPR in my opinion.
Question:
How can Gravatar completely disabled and ripped away from a wordpress blog???
Thanks!
michelle says
Very helpful – avatar easily and successfully removed. Thank you!
Steve says
Very helpful advice and it works. But still leaves my name on the page below where the gravatar used to be. Any solution?
lannis says
Thanks, it was very helpful!
WPBeginner Staff says
How to display gravatars with user email in WordPress
Alex says
I have successfully disable gravatars, but would like my gravatar to be displayed in the author info box. How can I accomplish this?
WPBeginner Staff says
Here is how to allow users to upload custom avatars in WordPress.
Manuel Echeverry says
gracias amigo, domo arigato, tanks
Manuel Echeverry says
how do you allow people to choose customs avatars?
Wil Ransz says
Instead of dabbling with PHP, you could simply hide the avatar by adding the following CSS at the end of the stylesheet:
.comment-author .avatar {
display: none;
}
WPBeginner Support says
That’s possible. However, the gravatar will still be visible to crawlers. One reason that some users may not want gravatar could be that they are building something where they simply don’t need it.
管理者
Zimbrul says
Is that possible to replace the Gravatar with another generic icon when the person commenting has got no Gravatar?
Editorial Staff says
Yes you can do that. Follow this tutorial:
https://www.wpbeginner.com/plugins/how-to-add-new-default-avatars-in-wordpress/
管理者
Dave Navarro says
This disables WordPress from showing Avatars, but it does NOT disable Gravatar. On the back end, it still calls home to Gravatar slowing your site down.
What’s needed is the ability to rip Gravatar out of WordPress.
Zimbrul says
Is that possible?