# Cannot read property 'picture' of undefined

**URL:** <https://community.auth0.com/t/cannot-read-property-picture-of-undefined/7827>\
**Category:** Get Help\
**Tags:** user\_metadata\
**Created:** [August 12, 2017, 2:19am UTC](https://community.auth0.com/t/cannot-read-property-picture-of-undefined/7827 "2017-08-12T02:19:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![toddler4372](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/toddler4372/32/6493_2.png) [@toddler4372](https://community.auth0.com/u/toddler4372)\
**Post date:** [August 12, 2017, 2:19am UTC](https://community.auth0.com/t/cannot-read-property-picture-of-undefined/7827/1 "2017-08-12T02:19:34Z")

</div>

I’m trying to access the profile picture of a user and display it. I’m using the Angular2-CLI Login-01 example, and I get the error in the subject heading. Here is my HTML:

```
<img [src]="profile.picture" class="profile-avatar"/>

```

I also tried a simple user\_metadata attribute like:

```
<h4>Welcome, {{ profile.first_name }}</h4>

```

…and I get a similar error, "cannot read property of ‘first\_name’ of undefined. My AngularJS Auth0 app worked without a hitch when displaying user\_metadata, so I need advice here.

---

<div class="post-metadata">

**Author:** ![toddler4372](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/toddler4372/32/6493_2.png) [@toddler4372](https://community.auth0.com/u/toddler4372)\
**Post date:** [August 15, 2017, 12:48am UTC](https://community.auth0.com/t/cannot-read-property-picture-of-undefined/7827/2 "2017-08-15T00:48:05Z")

</div>

I’ve gotten the user pic to show up with:

```
<img src="{{profile?.picture}}" class="profile-avatar-lg">

```

but when I try to access the user\_metadata with:

```
{{ profile?.user_metadata.first_name }}

```

I get the error `ERROR TypeError: Cannot read property 'first_name' of undefined`

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:55am UTC](https://community.auth0.com/t/cannot-read-property-picture-of-undefined/7827/3 "2018-03-02T05:55:54Z")

</div>


