[Documentation](https://groundhogg.io/documentation/) » [Filter Hooks](https://groundhogg.io/documentation/#doc-filter-hooks)

# groundhogg/contact/profile_picture

Published Wednesday, June 10, 2026 · Last updated Wednesday, June 10, 2026

Filters the profile picture URL for a contact. By default this returns a Gravatar URL. Use this to substitute a custom avatar source.

```

apply_filters( 'groundhogg/contact/profile_picture', $url, $contact_id, $contact );
```

You will receive the default picture URL string, the contact ID integer, and the `Contact` object.

## Example

```

add_filter( 'groundhogg/contact/profile_picture', 'my_extension_custom_avatar', 10, 3 );

/**
 * Use a CRM-stored avatar instead of Gravatar.
 *
 * @param string               $url
 * @param int                  $contact_id
 * @param \Groundhogg\Contact $contact
 *
 * @return string
 */
function my_extension_custom_avatar( $url, $contact_id, $contact ) {
    $custom = $contact->get_meta( 'custom_avatar_url' );

    return $custom ?: $url;
}
```
