# Display live image data (base64 jpeg) in Kibana

**URL:** <https://discuss.elastic.co/t/display-live-image-data-base64-jpeg-in-kibana/324871>\
**Category:** Kibana\
**Created:** [February 7, 2023, 8:44am UTC](https://discuss.elastic.co/t/display-live-image-data-base64-jpeg-in-kibana/324871 "2023-02-07T08:44:20Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![rcowart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rcowart/32/88091_2.png) [@rcowart](https://discuss.elastic.co/u/rcowart)\
**Post date:** [February 11, 2023, 8:24pm UTC](https://discuss.elastic.co/t/display-live-image-data-base64-jpeg-in-kibana/324871/21 "2023-02-11T20:24:56Z")

</div>

The issue is because you are using the wrong aggregation. You have used `count` which is going to provide a count of documents, i.e. a number. To retrieve the actual text value of a `keyword` field, you must use a `top_hit` aggregation.

In the example below I am fetching the value of the most recent network interface name in the data. You will also need to use a `size` of `1` to retrieve only a single value.

The actual markdown that prints the value is `{{ latest.netif.last.formatted }}`.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/e/ae241678d627bf4531c7b129d306fb213a8af458.png)

You will need to wrap your data value in the other text needed and I expect it would work. Something like:

```auto
![label](data:image/png;base64,{{ YOUR DATA VALUE }})

```

---

<div class="post-metadata">

**Author:** ![Alice\_Ionescu](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@Alice\_Ionescu](https://discuss.elastic.co/u/Alice_Ionescu)\
**Post date:** [February 13, 2023, 8:42am UTC](https://discuss.elastic.co/t/display-live-image-data-base64-jpeg-in-kibana/324871/22 "2023-02-13T08:42:59Z")

</div>

> [@rcowart](#):
>
> `![label](data:image/png;base64,{{ YOUR DATA VALUE }})`

Hello,  
I've tried it, but nothing is displayed ☹  
Only the label

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/1/71031acadf2040ac01fd80223d21eddb13b6104d.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/1/612355ac96c082fccc95b33c9a38280fabfcad4b.png)

in Discover tab I do see the image

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/a/7ae8e29b7f801ced9521f1ed8e90326ad90b8692.png)

If I copy paste it directly instead of **{{ latest.photo.last.formatted }}** I do have an image displayed

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/f/2f7971e17a09fe04f8e3d94a47e3a4fc1cf7ebb9.png)

Thanks for your help.

---

<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:** [March 13, 2023, 8:43am UTC](https://discuss.elastic.co/t/display-live-image-data-base64-jpeg-in-kibana/324871/23 "2023-03-13T08:43:16Z")

</div>

Closed on March 13, 2023, 8:43am UTC

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

[Previous page](https://discuss.elastic.co/t/display-live-image-data-base64-jpeg-in-kibana/324871.md?page=1)
