Why can't we see own "Profile Header" images? šŸ¤”

AI-generated summary

Community members are unable to view their own ā€œProfile Headerā€ image when looking at their profiles. Richie asked for an explanation, and Johani provided the reason: the container with the background image is collapsed by default when viewing one’s own profile. To view the image, users can click the ā€œexpandā€ button. Alternatively, a theme modification can be applied using a script to override this behavior and always display the image. Richie thanked Johani for the solution.

Our community members (and I) are wondering why they can’t see their own ā€œProfile Headerā€ image when viewing their own profiles.

They usually want to see how their profile page looks to other people but they have no way of viewing their image once uploaded.

I’m guessing there’s a reason for this but I can’t think what that reason might be :blush:

Can anyone shed any light for me so I can let them know?

The container that has the background is collapsed by default if you’re viewing your own profile. If you click on expand here

you’ll see the background.

It’s collapsed by default if you’re viewing your own profile because you usually care more about the information below the image rather than the image itself - especially on mobile.

If you’d like to override this behavior, you can add something like this in your theme’s common > header tab.

<script type="text/discourse-plugin" version="0.8">
  const discourseComputed = require("discourse-common/utils/decorators").default;

  api.modifyClass("controller:user", {
    @discourseComputed
    viewingSelf() {
      return false;
    }
  });
</script>

Well, that’s embarrassing to say the least :man_facepalming:

Thank you for the solution @Johani :slight_smile: