How do I stop people from Pinning my Author Image?

Disclosure: Please note that this article may contain affiliate links. You can read the full disclosure here.

If you want to stop people from pinning the Gravatar image from your Author box or comments, you can add the following code to your WordPress functions.php file.

If you do not know how to access your functions.php see this post for instructions.

function wpba_gravatar_nopin($wpbaGravatar) {
if (have_comments()) {
$alt = get_comment_author();
else {
$alt = get_the_author_meta('display_name');
$wpbaGravatar = str_replace('alt=\'\'', 'alt=\'Avatar for ' . $alt . '\' title=\'Gravatar for ' . $alt . '\' data-pin-nopin=\'true\'', $wpbaGravatar);
return $wpbaGravatar;
add_filter('get_avatar', 'wpba_gravatar_nopin');

The code above is modified from this post here to add the alt text to your gravatar on Crunchify, modified above to add the nopin option to your author and comment gravatar images.

Note – if someone uses the Tailwind extension, enters your URL on Pinterest directly or another method to pin your post the images may still be pinnable.

Avatar for Tara, WP Blogger Assist

I have over 15 years experience in IT. Over this time: managing server infrastructure, building websites and more. This website is dedicated to helping WordPress bloggers with setting up their blogs and websites; optimizing fast page loading, SEO and social media marketing - such as; Pinterest, Facebook and more.

Leave a Comment