XF 2.2 Prevent user clicking profile picture on profile page


Well-known member

I would like to stop users being able to click the profile photo and be taken to the url image as they then must click back to return to the site.

I would rather it directed to edit image on the users profile page and no action on others.

If that is not possible I just wish to disable users from clicking it.
In template: member_view

                             <xf:avatar user="{$user}" size="l"
                                href="{{ $user.getAvatarUrl('o') ?: '' }}" />
Replace with:
                             <xf:avatar user="{$user}" size="l" href="#"/>

That will remove it, there's no point in making it edit since the edit button shows right below if it's your own profile. If you change it to an edit button, then clicking on other's profiles will prompt editing people's own avatar, which doesn't make sense.
Last edited:
Top Bottom