# Error on load image resource

**URL:** <https://forum.ionicframework.com/t/error-on-load-image-resource/33832>\
**Category:** ionic-v1\
**Created:** [October 5, 2015, 2:37am UTC](https://forum.ionicframework.com/t/error-on-load-image-resource/33832 "2015-10-05T02:37:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamjb](https://avatars.discourse-cdn.com/v4/letter/i/a9a28c/32.png) [@iamjb](https://forum.ionicframework.com/u/iamjb)\
**Post date:** [October 5, 2015, 2:37am UTC](https://forum.ionicframework.com/t/error-on-load-image-resource/33832/1 "2015-10-05T02:37:16Z")

</div>

Hi,

I put a image url in my controller as:

> $scope.imageUrl = “[http://ionicframework.com/img/homepage/ionicview-icon\_2x.png](http://ionicframework.com/img/homepage/ionicview-icon_2x.png)”;

And call it as html img tag as:

> \< img src="{{imageUrl}} \>

And i got error:

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/1/c/1c0c8636d7a5deb65aec3ab066b0c5ef979df517.png)

> Failed to load resource: the server responded with a status of 400 (Bad Request)  
> [http://run.plnkr.co/jowmcy9KplJnQ5hM/{{imageUrl}}](http://run.plnkr.co/jowmcy9KplJnQ5hM/%7B%7BimageUrl%7D%7D)

* * *

* * *

The image show properly but the error still there, can any one help?

I created a plnkr as ref.

> **[Plunker - Ionic starter](https://plnkr.co/edit/DcSZqdVWOjedOqy0bF00?p=preview)**
>
> Created on https://plnkr.co: Helping you build the web.

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![bengtler](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bengtler/32/98565_2.png) [@bengtler](https://forum.ionicframework.com/u/bengtler)\
**Post date:** [October 5, 2015, 5:54am UTC](https://forum.ionicframework.com/t/error-on-load-image-resource/33832/2 "2015-10-05T05:54:32Z")

</div>

use ng-src instead of src 😉

FirstTime your view content is loading the variable is not initialized, yet. But the src-attribute tries to load the unknown image. NG-src gets this fixed.

---

<div class="post-metadata">

**Author:** ![iamjb](https://avatars.discourse-cdn.com/v4/letter/i/a9a28c/32.png) [@iamjb](https://forum.ionicframework.com/u/iamjb)\
**Post date:** [October 6, 2015, 3:49am UTC](https://forum.ionicframework.com/t/error-on-load-image-resource/33832/3 "2015-10-06T03:49:51Z")

</div>

Thx @bengtler.  
It’s work!!!  
There are not more annoying error log.
