I want to display dynamic images in the dashboard

  • What Grafana version and what operating system are you using?
    latest Grafana version and Windows 10

  • What are you trying to achieve?
    I have created a table in the MySQL database. The table contains 2 columns(col1:contains Ids, col2: contains image link). I have created a variable for the Ids in the dashboard. Now based on the Id that has been selected in the dashboard the corresponding image stored in the dashboard should be displayed.

  • How are you trying to achieve it?
    I tried using the table panel using the ‘cell display mode’ (I have selected ‘image’ option in this mode) which helped me display the image in a row, but it is not as I had expected.

  • What happened?
    The image displayed in the row is quite small and I am not able to increase its size (as well as row height).

  • What did you expect to happen?
    I got the above solution in the Grafana community and I thought that I might have an option of increasing the row height, but there isn’t any.

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?

If anyone wants to share any other solution, you are most welcome
This is the image what I got.

I hope I get help as soon as possible

Hi @mayurvidhwani7387

I would explore using a plugin that is better suited for displaying dynamic images. Here are some options–hopefully one of them will suit your needs:

1 Like

You can do it with the old Grafana v6 table panel which supports HTML tags. I use it to display captured CCTV still images in real time on a dashboard. Like you, my MySQL database contains an image path which the Grafana instance needs to have read access to to enable it to display.

The newer Grafana v7 (and I think v8 is same) table panel removed the feature that made this possible (sanitize html). But you can still use the old v6 table panel with Grafana v7 (and I think v8). See my post here on the topic:

Thank you so much for helping me. The dynamic image panel worked for me :slight_smile:

1 Like

Thank you so much for helping

I tried using the dynamic image panel and I just want to display an image based on a URL only. Do you understand how to do that?

Hi,

Maybe you can try to display your URL image with the HTML Plugin Panel ?
It allows you to write HTML, so using < img src = “URL” > might be working.

An other panel that could be used is AJAX, but i didnt work with it yet.
I just used Base64 displaying.

Hi Can u tell me how u made the dynamic panel work…How was the data stored in the database (the image) and also how did u write the query …I am new to this and I am trying to achieve the same thing like with a drop down should be able to select the image …It would be really helpful if u could show a sample of the query and how to store the image in the database

@firdous check out the post here, it has some information about encoding images from a database:

This topic was automatically closed after 365 days. New replies are no longer allowed.