# 在主导航中将个人资料图片替换为“个人资料”

**URL:** https://meta.discourse.org/t/replacing-profile-image-with-profile-on-the-main-navigation/133918
**Category:** Development
**Created:** [2019年十一月20日 13:44 UTC](https://meta.discourse.org/t/replacing-profile-image-with-profile-on-the-main-navigation/133918 "2019-11-20T13:44:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ahmadabdolsaheb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ahmadabdolsaheb/32/138662_2.png) [@ahmadabdolsaheb](https://meta.discourse.org/u/ahmadabdolsaheb)
#### Post date: [2019年十一月20日 13:44 UTC](https://meta.discourse.org/t/replacing-profile-image-with-profile-on-the-main-navigation/133918/1 "2019-11-20T13:44:27Z")

</div>

我认为负责个人资料图片导航项的组件是 “user-dropdown”，所以我正在尝试修改它，但没看到图片是在哪里被赋值的。这是我目前做到的程度。

任何帮助都将不胜感激。

```plaintext
<script type="text/discourse-plugin" version="0.8">
  const h = require("virtual-dom").h;
    api.reopenWidget("user-dropdown", {
      html(attrs) {
          console.log(attrs);
          return h(
            "a.icon",
            {
              attributes: {
                href: 'attrs.user.get("path")',
                "data-auto-route": true
              }
            },
            this.attach("header-notifications", attrs)
          );
        }
    });
</script>

```
