# \<img \[src\]="profilePicture"\> GET http://localhost:8100/null 404 (Not Found)

**URL:** <https://forum.ionicframework.com/t/img-src-profilepicture-get-http-localhost-8100-null-404-not-found/126559>\
**Category:** ionic-v3\
**Created:** [April 2, 2018, 1:34am UTC](https://forum.ionicframework.com/t/img-src-profilepicture-get-http-localhost-8100-null-404-not-found/126559 "2018-04-02T01:34:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lado](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@lado](https://forum.ionicframework.com/u/lado)\
**Post date:** [April 2, 2018, 1:34am UTC](https://forum.ionicframework.com/t/img-src-profilepicture-get-http-localhost-8100-null-404-not-found/126559/1 "2018-04-02T01:34:00Z")

</div>

Hello,

I’m using image path string from **home.ts** in **app.components.ts** side menu for profile image avatar:

in **home.ts** I have imported `public events: Events` to function:

```auto
 setImage() {
        ...
        this.events.publish('img:added', data);  
 }

```

in **app.components.ts** with import of `public events: Events` constructor load to attach with `profilePicture: string` variable:

```auto
  getImage() {
    this.events.subscribe('img:added', (data) => {
      this.profilePicture = data.text();
    });
  }

```

to use it in **app.html** of **app.components.ts** side menu avatar:

```auto
  <ion-list>
      <ion-item>
        <ion-avatar item-start>
       <img [src]="profilePicture"> 
        </ion-avatar>
      </ion-item>
    </ion-list>

```

Image appears with icon, but Chrome console shows this error caused by `<img [src]="profilePicture">` : **GET [http://localhost:8100/null](http://localhost:8100/null) 404 (Not Found)** if I’m add `<img *ngIf="profilePicture" [src]="profilePicture">` error disappears with image. Not sure how to figure out

---

<div class="post-metadata">

**Author:** ![hirenkorat3](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hirenkorat3/32/128872_2.png) [@hirenkorat3](https://forum.ionicframework.com/u/hirenkorat3)\
**Post date:** [April 2, 2018, 6:46am UTC](https://forum.ionicframework.com/t/img-src-profilepicture-get-http-localhost-8100-null-404-not-found/126559/2 "2018-04-02T06:46:02Z")

</div>

can you show the value of `profilePicture` variable

---

<div class="post-metadata">

**Author:** ![lado](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@lado](https://forum.ionicframework.com/u/lado)\
**Post date:** [April 2, 2018, 9:41pm UTC](https://forum.ionicframework.com/t/img-src-profilepicture-get-http-localhost-8100-null-404-not-found/126559/3 "2018-04-02T21:41:58Z")

</div>

Hello, @hirenkorat3 sure, it is Google Plus profile image or just image path like this: `https://lh4.googleusercontent.com/-UserProfilePath/AAAAAAAAAAI/AAAAAAAAANc/2Wk_ewjEgMk/photo.jpg`

---

<div class="post-metadata">

**Author:** ![hirenkorat3](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hirenkorat3/32/128872_2.png) [@hirenkorat3](https://forum.ionicframework.com/u/hirenkorat3)\
**Post date:** [April 3, 2018, 4:58am UTC](https://forum.ionicframework.com/t/img-src-profilepicture-get-http-localhost-8100-null-404-not-found/126559/4 "2018-04-03T04:58:49Z")

</div>

this is encrypted url created by google so i think you can not directly use it.you can use only those url which display image directly in browser.try this url in your browser and see what you get !!!

---

<div class="post-metadata">

**Author:** ![kalyanchatterjee](https://avatars.discourse-cdn.com/v4/letter/k/9dc877/32.png) [@kalyanchatterjee](https://forum.ionicframework.com/u/kalyanchatterjee)\
**Post date:** [March 20, 2021, 6:41pm UTC](https://forum.ionicframework.com/t/img-src-profilepicture-get-http-localhost-8100-null-404-not-found/126559/5 "2021-03-20T18:41:06Z")

</div>

Has anyone solved this if your photos are coming from a service? I am just doing the Ionic 5 Photo Gallery tutorial. And I have this error. The following doesn’t solve it.

```auto
<ion-grid>

    <ion-row>

      <ion-col size="6"

        *ngFor = "let photo of photoService.photos; index as position">

        <ion-img *ngIf="photo.webviewPath" [src]="photo.webviewPath"></ion-img>

      </ion-col>

    </ion-row>

  </ion-grid>

```

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 8:52pm UTC](https://forum.ionicframework.com/t/img-src-profilepicture-get-http-localhost-8100-null-404-not-found/126559/6 "2021-07-19T20:52:05Z")

</div>

Closed on July 19, 2021, 8:52pm UTC


