Get Started Transforming Your Data in Snowflake

How to add image from my local drive (or location) into Looker dashboard?

  • Looker FAQs
  • January 21, 2018

We can use the HTML parameter in the LookML of the Dimension / Measure to have Looker render the image. For example:

dimension: tool_name {
  type: string
  sql: ${TABLE}.tool_name;;
  html: <img src="https://logo-core.clearbit.com/looker.com" /> ;;
}

In this case, the text of each row will be replaced by the following image:

Please note: The “img src” tag of HTML can have values of locations like AWS S3, any website, shared drives (dropbox, google drive), etc.

Dynamic Images

To change the images based on the value of the row, we can input the value of the row into the HTML parameter using the Liquid variable {{value}}.

For example:

dimension: homepage_image {
  type: string
  sql: ${TABLE}.tool_name_url;;
  html: <img src="https://logo-core.clearbit.com/{{value}}" /> ;;
}

In the above dimension, the URL changes for each row as we append company URLs to the end of https://logo-core.clearbit.com/, a website that provides various companies’ logo images based on the URLs.


Up Next:

Read How to do conditional formatting of color or images within table cells using HTML in Looker?

More Resources We Think You Might Like

How to create a funnel chart visualization in Looker?

How to create a funnel chart visualization in L...

A Funnel chart is best used to understand the linear sequence of events, such as search movement ...

  • Looker FAQs
  • January 15, 2018
How to create a funnel chart visualization in Looker?

How to add custom visualization in Looker using...

In Looker, there are two ways to add custom visualizations using Javascript: Adding a custom visu...

  • Looker FAQs
  • January 15, 2018
How to create a funnel chart visualization in Looker?

How to show the column value labels without cha...

This post explains how to show the column value labels without changing the value label format fo...

  • Looker FAQs
  • January 15, 2018