Survey banner
The Dataiku Community is moving to a new home! Some short term disruption starting next week: LEARN MORE

Using imge files in Dash App

Level 3
Using imge files in Dash App

Hi all,

I have an image file placed under the static web resources in Dataiku.
How do we specify the path for this image so that I can use this image in my Dash app?

Note: I am using an online instance of Dataiku and not on my local server.

Operating system used: Windows

0 Kudos
3 Replies

Hi @Usersyed ,

Global Shared Code is not available on Dataiku Online instances at this time. So you will not be able to use static resources. You should instead use a Managed folder where you store the images and read from that folder. 

import as px
import dataiku
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
import plotly.graph_objects as go
import dash
import base64

#replace images with the actual folder name
folder = dataiku.Folder("images")

with folder.get_download_stream("subfolder/test.png") as stream:
    encoded_image = base64.b64encode(

    app.layout = html.Div([

0 Kudos
Level 3

@AlexT Thank you for this solution.
I will test this one also.
I tried using "/local/static/image_name"  as the file path and it worked.

0 Kudos
Level 1

Hi, how would this work in cases where you're using DataIku on a local server?

0 Kudos