# Replacing default picture with member's profile picture

**URL:** <https://forum.wixstudio.com/t/replacing-default-picture-with-members-profile-picture/80265>\
**Category:** Ask the community\
**Tags:** wix-members-frontend, wix-members-area, question, code, wix\
**Created:** [October 18, 2026, 12:11am UTC](https://forum.wixstudio.com/t/replacing-default-picture-with-members-profile-picture/80265 "2026-10-18T00:11:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![austinmdiamond](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/austinmdiamond/32/84276_2.png) [@austinmdiamond](https://forum.wixstudio.com/u/austinmdiamond)\
**Post date:** [October 18, 2026, 12:11am UTC](https://forum.wixstudio.com/t/replacing-default-picture-with-members-profile-picture/80265/1 "2026-10-18T00:11:52Z")

</div>

**First success:**

Hi! A while ago with help from awesome people here, I figured out how to make a default picture in the header be replaced with the logged-in user’s profile picture. I placed it on the masterpage.js in Velo. See picture and code below:

 ![Screenshot 2026-10-17 at 5.05.19 PM](https://us1.discourse-cdn.com/wix/original/3X/7/f/7fb383becf4276dd7a190a8829d235a3a757eb95.png)

```javascript
import { authentication, currentMember } from 'wix-members-frontend';

$w.onReady(function () {
    if (authentication.loggedIn()) {
        fetchMemberData();
    }
});

function fetchMemberData() {
    currentMember.getMember({ fieldsets: ['FULL'] })
        .then((member) => {
            const profilePhoto = member?.profile?.profilePhoto?.url;

            if (profilePhoto) {
                $w('#memberimage').src = profilePhoto;
            }
        })
        .catch((error) => {
            console.error('Error fetching member data:', error);
        });
}

```

**Here is my next question:**

When my user visits another user’s member’s area profile page (i.e. the one Wix automatically creates for each member), I want a dummy image to be replaced with the actual profile picture of the member the user is viewing. See below! So, for example, if “me” visits John’s profile, that cereal bowl is replaced with John’s profile picture. If “me” visits Derek’s profile, it’s replaced with Derek’s profile picture, etc. I know that the default profile page has the member picture, but it’s way too small, so this is why I want to create a custom solution with code, in the same way that I did it for the logged-in user in the header.

 ![Screenshot 2026-10-17 at 5.04.42 PM](https://us1.discourse-cdn.com/wix/original/3X/a/0/a0d82f3c30bc5eb393c5750b9182acfcd469df75.jpeg)

I would be so so grateful if anyone can figure this out! 🙂 I am working in Wix Editor.

---

<div class="post-metadata">

**Author:** ![austinmdiamond](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/austinmdiamond/32/84276_2.png) [@austinmdiamond](https://forum.wixstudio.com/u/austinmdiamond)\
**Post date:** [October 18, 2026, 12:48am UTC](https://forum.wixstudio.com/t/replacing-default-picture-with-members-profile-picture/80265/2 "2026-10-18T00:48:45Z")

</div>

To further illustrate, this is what I am trying to accomplish:

 ![me meets joe copy](https://us1.discourse-cdn.com/wix/original/3X/b/f/bf94fe35caae1ddc981c48b770fe0aa3d6360a4b.jpeg).

 ![me meets jane copy](https://us1.discourse-cdn.com/wix/original/3X/9/0/90d7ff06f39cf85b517cc4f749fc0e6cdaf43d01.jpeg)

---

<div class="post-metadata">

**Author:** ![Ecom\_swift\_LLC](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/ecom_swift_llc/32/122562_2.png) [@Ecom\_swift\_LLC](https://forum.wixstudio.com/u/Ecom_swift_LLC)\
**Post date:** [October 18, 2026, 1:10am UTC](https://forum.wixstudio.com/t/replacing-default-picture-with-members-profile-picture/80265/3 "2026-10-18T01:10:02Z")

</div>

Nice work on the header one. For the viewed member, the page has to work out whose profile it is, then fetch that member’s photo on the backend, because currentMember only ever returns the logged-in person.

Step 1, get the slug from the URL on the profile page (frontend)🙂

````javascript

import wixLocation from 'wix-location-frontend';
import { getMemberPhoto } from 'backend/members.web';

$w.onReady(async () => {
  const slug = wixLocation.path[1]; // /profile/<slug>/profile
  const url = await getMemberPhoto(slug);
  if (url) $w('#memberimage').src = url;
});
```

Step 2, backend/members.web.js (needs elevation to read other members):

```
import { Permissions, webMethod } from 'wix-web-module';
import { members } from 'wix-members-backend';
import { auth } from '@wix/essentials';

export const getMemberPhoto = webMethod(Permissions.Anyone, async (slug) => {
  const elevatedQuery = auth.elevate(members.queryMembers);
  const res = await elevatedQuery().eq('profile.slug', slug).find();
  return res.items[0]?.profile?.photo?.url;
});
```

Check the real path index with console.log(wixLocation.path) first, since it depends on your profile URL setup. Also confirm Velo code can attach to your Members profile page in your editor, as that page is an app page and I'm not certain every version allows it. If it doesn't, the same backend function works from a custom profile page.

If this helped, please mark it as Solved.

````

---

<div class="post-metadata">

**Author:** ![austinmdiamond](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/austinmdiamond/32/84276_2.png) [@austinmdiamond](https://forum.wixstudio.com/u/austinmdiamond)\
**Post date:** [October 18, 2026, 3:26am UTC](https://forum.wixstudio.com/t/replacing-default-picture-with-members-profile-picture/80265/4 "2026-10-18T03:26:26Z")

</div>

Hi Ecomswift, thanks for your _swift_ response! 😉

I’m sorry, maybe I sounded too professional from my post above…I tried pasting your code as you put it exactly onto the page I want it (the Members Area profile page), but it didn’t work. I know that you have written that I need to replace things with my specific site details, but I really don’t know where I am supposed to do that, and what I’m supposed to do…again, I am really a coding noob. 🫠

If it helps, the URL of the profile page is [abc.com/profile/userid/profile](http://abc.com/profile/userid/profile). [I would make it simpler if I could, but that’s not as important right now!] The default image’s ID that I want to replace is #defaultprofile.

If you could tell me the exact code that would be absolutely amazing. Again, I’m really sorry that I don’t know how to do it myself…I really, truly hope this helps somebody else, too. 😊

Thank you!

Austin

---

<div class="post-metadata">

**Author:** ![austinmdiamond](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/austinmdiamond/32/84276_2.png) [@austinmdiamond](https://forum.wixstudio.com/u/austinmdiamond)\
**Post date:** [October 19, 2026, 7:57pm UTC](https://forum.wixstudio.com/t/replacing-default-picture-with-members-profile-picture/80265/5 "2026-10-19T19:57:51Z")

</div>

bump! 😊

It seems like it should be easy to do, and we’re so close…crossing my fingers! 🙂

---

<div class="post-metadata">

**Author:** ![austinmdiamond](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/austinmdiamond/32/84276_2.png) [@austinmdiamond](https://forum.wixstudio.com/u/austinmdiamond)\
**Post date:** [October 20, 2026, 5:08pm UTC](https://forum.wixstudio.com/t/replacing-default-picture-with-members-profile-picture/80265/6 "2026-10-20T17:08:15Z")

</div>

another try, asking for help…🙂
