# What is the correct src for the image in my app?

**URL:** <https://discuss.elastic.co/t/what-is-the-correct-src-for-the-image-in-my-app/86140>\
**Category:** Kibana\
**Created:** [May 17, 2017, 4:02pm UTC](https://discuss.elastic.co/t/what-is-the-correct-src-for-the-image-in-my-app/86140 "2017-05-17T16:02:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![trex](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/trex/32/34230_2.png) [@trex](https://discuss.elastic.co/u/trex)\
**Post date:** [May 17, 2017, 4:02pm UTC](https://discuss.elastic.co/t/what-is-the-correct-src-for-the-image-in-my-app/86140/1 "2017-05-17T16:02:42Z")

</div>

I develop a Kibana (v 5.2.2) app.

There is an image in HTML template: `<img src="plugins/myapp/public/image.svg">` And the system path for the image is `kibana/plugins/myapp/public/image.svg`

I receive the not found error when the template is loaded: `https://localhost:5606/obp/app/plugins/sentinl/sentinl_logo.svg 404 (Not Found)`

What is the correct src for the image?

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [May 17, 2017, 4:39pm UTC](https://discuss.elastic.co/t/what-is-the-correct-src-for-the-image-in-my-app/86140/2 "2017-05-17T16:39:10Z")

</div>

@trex you'll want to exclude the `public` part from your URL, so you'd use `<img src="plugins/myapp/image.svg">`.

---

<div class="post-metadata">

**Author:** ![trex](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/trex/32/34230_2.png) [@trex](https://discuss.elastic.co/u/trex)\
**Post date:** [May 18, 2017, 7:18am UTC](https://discuss.elastic.co/t/what-is-the-correct-src-for-the-image-in-my-app/86140/3 "2017-05-18T07:18:29Z")

</div>

I put `<img src="plugins/sentinl/sentinl_logo.svg">`.  
And now I have this error:  
`GET https://localhost:5606/obp/app/plugins/sentinl/sentinl_logo.svg 404 (Not Found)`

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [May 18, 2017, 11:47am UTC](https://discuss.elastic.co/t/what-is-the-correct-src-for-the-image-in-my-app/86140/4 "2017-05-18T11:47:54Z")

</div>

@trex apologies, would you try using the `kbn-url` AngularJS attribute mentioned here [https://github.com/elastic/kibana/blob/master/docs/development/core/development-basepath.asciidoc#img-and-a-elements](https://github.com/elastic/kibana/blob/master/docs/development/core/development-basepath.asciidoc#img-and-a-elements)

---

<div class="post-metadata">

**Author:** ![trex](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/trex/32/34230_2.png) [@trex](https://discuss.elastic.co/u/trex)\
**Post date:** [May 18, 2017, 2:00pm UTC](https://discuss.elastic.co/t/what-is-the-correct-src-for-the-image-in-my-app/86140/5 "2017-05-18T14:00:23Z")

</div>

I tried it, no success. I fixed the image with CSS:

```
.image {
  height: 170px;
  margin-bottom: 20px;
  background: url('../image.svg') no-repeat;
  background-size: contain;
}
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 15, 2017, 2:01pm UTC](https://discuss.elastic.co/t/what-is-the-correct-src-for-the-image-in-my-app/86140/6 "2017-06-15T14:01:01Z")

</div>

Closed on June 15, 2017, 2:01pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
