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?

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group