How to display an image in a panel plugin?

Hello Everybody,

I have a very basic question. I am developing a grafana plugin that should make some http request to display an image.
However, is it possible to make the http request in the panel plugin? Or should I create a data source plugin for that?

To make the http request is there any grafana http library? Or should I use an alternative library as axios?

Thank you very much for your help!

Cheers,
Turtles

Hello.

I am not sure if I understood correctly. You want to display an image in a panel?

If so, you don’t need a datasource. There are at least 2 ways of doing it:

  1. You can use the text panel in the html mode (may or may not need to disable html sanitize in the config file) and use html tag to display an image.
  2. You can also develop a panel plugin that basically returns an image
1 Like

yes, the two options are great!
Thank you!

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