cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I embed image to the cell using markdown or code?

YosepWijaya
New Contributor

I have been trying to embed the image from the dbfs location, when I run the code, the image is unknown or question mark.

I have tried following code:

The path of the file is dbfs:/FileStore/tables/svm.jpg

displayHTML("<img src ='dbfs:/FileStore/tables/svm.jpg'>")

displayHTML("<img src ='/FileStore/tables/svm.jpg'>")

4 REPLIES 4

PohlPosition
New Contributor III
New Contributor III

@Yosep Wijaya

When you write the image to DBFS, you should write it to /FileStore/svm.jpg

When you reference the file in html, it should be via /files/svm.jpg

@jason Thanks!! than

VenkataMoganti
New Contributor II

capture.pngAdd files before the path

Use this format to add the file

![Name of the image](files/tables/svm.jpg)

please check this https://docs.databricks.com/data/filestore.html

AlexBrulliea
New Contributor II

Is there a way to embed an image from mounted storage into my markdown cell? Or can this only be done using the dbfs files?

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.