Join us at the Everyday AI Conference in London, New York & Bengaluru! REGISTER NOW

Display images from folder in Standard webapp

lmartignoni
Level 1
Display images from folder in Standard webapp

Hello!

I would like to display in my frontend images from folder, for example in a <img />

But I can't have the full path because I don't have the folder's path but just its name.

I have found a way to download files from a folder but I don't know how to just display it.

 


filename = "img_path" #path with respect to the folder
stream = folder.get_download_stream(filename)
with stream:
       return send_file(
                io.BytesIO(stream.read()),
                as_attachment=True,
                attachment_filename=filename)

 

Thanks a lot

Regards

0 Kudos
1 Reply
CoreyS
Community Manager
Community Manager

Hi @lmartignoni and welcome to the Dataiku Community. While you wait for a more complete response, if you have the option to use Bokeh as opposed to a Standard Webapp, I wanted to make you aware of this Knowledge Base resource, How-To: Display an Image With Bokeh.

I hope this helps!

Looking for more resources to help you use Dataiku effectively and upskill your knowledge? Check out these great resources: Dataiku Academy | Documentation | Knowledge Base

A reply answered your question? Mark as ‘Accepted Solution’ to help others like you!
0 Kudos