cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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
Databricks Employee
Databricks Employee

@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?

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now