# Tying to add static images in kibana plugin

**URL:** <https://discuss.elastic.co/t/tying-to-add-static-images-in-kibana-plugin/141867>\
**Category:** Kibana\
**Created:** [July 27, 2018, 4:20am UTC](https://discuss.elastic.co/t/tying-to-add-static-images-in-kibana-plugin/141867 "2018-07-27T04:20:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Faizan](https://avatars.discourse-cdn.com/v4/letter/f/f0a364/32.png) [@Faizan](https://discuss.elastic.co/u/Faizan)\
**Post date:** [July 27, 2018, 4:20am UTC](https://discuss.elastic.co/t/tying-to-add-static-images-in-kibana-plugin/141867/1 "2018-07-27T04:20:24Z")

</div>

Hi all,

Hope you are doing good.

I am trying to add images on my custom kibana plugin but i m getting below error. Any idea how to resolve below error in order to display static images in kibana plugin development.

**Image markup:**  
\<img src={require('../images/logo.jpg')} alt=""/\>

**Error Message :**  
Unexpected character '�' (1:0)  
You may need an appropriate loader to handle this file type.

Your advise is highly appreciated.

Thank you,

Kindest Regards,  
Faizan

---

<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:** [July 30, 2018, 4:02pm UTC](https://discuss.elastic.co/t/tying-to-add-static-images-in-kibana-plugin/141867/2 "2018-07-30T16:02:40Z")

</div>

@Faizan, the easiest solution is going to be to use a `.png` instead of a `.jpg` as Kibana's optimizer is only using the `url-loader` for `.pngs` [https://github.com/elastic/kibana/blob/master/src/optimize/base\_optimizer.js#L240](https://github.com/elastic/kibana/blob/master/src/optimize/base_optimizer.js#L240)

---

<div class="post-metadata">

**Author:** ![Faizan](https://avatars.discourse-cdn.com/v4/letter/f/f0a364/32.png) [@Faizan](https://discuss.elastic.co/u/Faizan)\
**Post date:** [July 31, 2018, 6:56am UTC](https://discuss.elastic.co/t/tying-to-add-static-images-in-kibana-plugin/141867/3 "2018-07-31T06:56:55Z")

</div>

Thanks Brandon.

---

<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:** [August 28, 2018, 6:56am UTC](https://discuss.elastic.co/t/tying-to-add-static-images-in-kibana-plugin/141867/4 "2018-08-28T06:56:59Z")

</div>

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