# Load image with Markdown in Dashboard

**URL:** <https://discuss.elastic.co/t/load-image-with-markdown-in-dashboard/160174>\
**Category:** Kibana\
**Created:** [December 10, 2018, 1:00pm UTC](https://discuss.elastic.co/t/load-image-with-markdown-in-dashboard/160174 "2018-12-10T13:00:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hermann102](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hermann102/32/41615_2.png) [@hermann102](https://discuss.elastic.co/u/hermann102)\
**Post date:** [December 10, 2018, 1:00pm UTC](https://discuss.elastic.co/t/load-image-with-markdown-in-dashboard/160174/1 "2018-12-10T13:00:59Z")

</div>

I want to display image to my dashboard. I put this image to /usr/share/kibana/src/ui/public/image/image.png

In Markdown, i insert this `![image] (file//usr/share/kibana/src/ui/public/image/image.png 'My image')`.  
But is not work for me. Please can you help me, to display this image with Markdown.  
I use kibana 6.4

Thank you!

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [December 10, 2018, 11:05pm UTC](https://discuss.elastic.co/t/load-image-with-markdown-in-dashboard/160174/2 "2018-12-10T23:05:18Z")

</div>

> `file//usr/share/kibana/src/ui/public/image/image.png`

Unless you can open that file like that from your browser (and I would be really surprised if you could), it's not going to work. The path you put in there needs to load on its own for it to work right.

`src/ui/public` isn't really the right place to drop files, that's where plugin code goes, and static files _are not served from that path_. ~~In fact, I don't think there's any path that Kibana will serve static assets from. You'll need some other way to host that image, either something internally (maybe via nginx), or via some image hosting service.~~

UPDATE: I think I was wrong about the static serving from Kibana... looking into things, give me a little time.

UPDATE 2: Ok, so there actually are 2 paths that static assets are served from, [as you can see here](https://github.com/elastic/kibana/blob/master/src/server/http/index.js#L116-L117). You could drop your image into `ui/public/assets/fonts` or `ui/public/assets/favicons` and then load your image from there. It's weird to be dropping images in either one, but it would work, and you could load it via `/ui/fonts/image.png` or `/ui/favicons/image.png`.

You could also modify the source to add a new path that you want to drop images into.

But keep in mind, if you do either of these, you'll lose that change, and the images, when you upgrade Kibana in the future.

The better option, assuming you don't want to serve the image from some other service, would be to expose it via a Kibana plugin. That way you could easily upgrade Kibana and just re-install that plugin instead of modifying all the Kibana source again. The plugin would just need to use the same `server.exposeStaticDir` method to expose a path inside the plugin. Bundle the image into your plugin, install it into Kibana, and now you can have the image hosted inside of Kibana. If you don't want to bundle the image, you could just have it serve assets from another path too, but that's a little more prone to breaking (if you change servers, for example).

---

<div class="post-metadata">

**Author:** ![hermann102](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hermann102/32/41615_2.png) [@hermann102](https://discuss.elastic.co/u/hermann102)\
**Post date:** [December 12, 2018, 5:42am UTC](https://discuss.elastic.co/t/load-image-with-markdown-in-dashboard/160174/3 "2018-12-12T05:42:13Z")

</div>

Hello joe,

Thank you for you reply. I try this, but is not work.

> !`[Code Error](file:///usr/share/kibana/src/ui/public/assets/favicons/image.png "Code Error")`

what the correct synthax ?  
Is there another plugin that can be used instead of Markdown ?

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [December 14, 2018, 12:32am UTC](https://discuss.elastic.co/t/load-image-with-markdown-in-dashboard/160174/4 "2018-12-14T00:32:40Z")

</div>

> file:///usr/share/kibana/src/ui/public/assets/favicons/image.png

I don't think that's what you want, since `file:` will point to your local machine, not the file on the server. Kibana should be hosting it, so you should be able to access it from `<your kibana hostname and port>/ui/favicons/image.png`, and then the correct why to use that in markdown would be:

```auto
![Code Error](<your kibana hostname and port>/ui/favicons/image.png)

```

`<your kibana hostname and port>` there would be `http://localhost:5601` or `https://internal.tld` or whatever you use to connect to Kibana.

---

<div class="post-metadata">

**Author:** ![hermann102](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hermann102/32/41615_2.png) [@hermann102](https://discuss.elastic.co/u/hermann102)\
**Post date:** [December 14, 2018, 5:54am UTC](https://discuss.elastic.co/t/load-image-with-markdown-in-dashboard/160174/5 "2018-12-14T05:54:01Z")

</div>

Thank you Joe, is work for me

> /usr/share/kibana/src/ui/public/assets/favicons/image.png

> in markdown  
> ![Image]( \<your kibana ip\>:5601/ui/favicons/image.png)

---

<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:** [January 11, 2019, 5:56am UTC](https://discuss.elastic.co/t/load-image-with-markdown-in-dashboard/160174/6 "2019-01-11T05:56:31Z")

</div>

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