Search code examples
apache-superset

unable to load local image in superset dashboard


i am trying to load a local image from D drive into my superset dashboard using markdown. but for some reason my default path is being appended to the url on which superset is running.

the path when i inspect the image in console window->

http://localhost:5000/superset/dashboard/3/D:\covid19-img.jpg

here is the code->

<img style="width:800px; height:280px;" src="D:\covid19-img.jpg">

can somenone help me with this?


Solution

  • found the solution. just like angular, images need to be kept in a certain folder. in your virtual environment find this path->

    \venv\Lib\site-packages\superset\static
    

    paste your image here. and then in markdown, put img src as

    /static/{your image here}.{image extension}
    

    this will load the local image in dashboard and then you will be able to download the dashboard as an image as well.