Notification

This Help Center is moving to Cloud. Learn more.

IMAGE

Access your image data.

The IMAGE function creates Image fields in your data source. Image fields display images in tables. Use this to show product images, video thumbnails, and other graphical information in your reports.

In this article:

Sample usage

Create a link to a product catalog page and display the product SKU as the link label:

IMAGE("www.example.com/cat-pictures/pic100.jpg, "A cute kitten playing with string")

Syntax

IMAGE(image_URL, [alt_text])

Parameters

  • image_URL - a field or expression that evaluates to a URL.
  • alt_text - (optional) a field or expression that evaluates to Text.

How the IMAGE function works

The IMAGE function takes a URL as input. The image_URL parameter can come from existing URL fields in the data source, or the parameter can be an expression that builds URLs from other fields and functions.

The optional alt_text parameter provides the the image's alternative text, which can be used by screen readers to assist vision-impaired users.

To display images in a report, add the Image field created by the IMAGE function to a table in your report. The size of the image displayed depends on the width of the column containing the image. If the URL is incorrect, or the image type is not supported, a broken image icon is displayed instead.

You can't change the data type of Image Link fields.

Examples

Example 1: Display YouTube thumbnails

  1. Edit your YouTube Analytics data source
  2. Create a calculated field (for example, Thumbnail)
  3. Use this formula to create an Image field:
IMAGE(CONCAT('https://i.ytimg.com/vi/', External Video Id, '/hqdefault.jpg') , Video Title)
  1. Add the Thumbnail field as a dimension in a table:

A table chart with Video Title, Thumbnail, and Views columns displays image thumbnails in the Thumbnail column.

Example 2: Create clickable images with HYPERLINK

The images displayed in Image fields are static, but you can generate clickable images by providing an Image field as the image parameter to the HYPERLINK function.

Limits of the IMAGE function

Images in tables only

Image fields only work in tables. If you change the visualization type, any Image fields in the chart will be ignored, or the image_URL will appear as the dimension value.

Images and your data

In addition to the name of a file you want view, hyperlinks and image URLs can also send information, in the form of query parameters appended to the URL path. For example:

http://some.domain.com/a/b/c/somefile.jpg?foo=bar&baz=bat

This URL is requesting the JPEG image somefile.jpg. It is also sending data via the foo and bar parameters.

When reports or data sources contain hyperlinks or image URLs, you should make sure that these point to trusted domains, and that any additional data being sent makes sense to you.

To help with this, images in Looker Studio have the following limits:

Images and the data control

When a report includes a data control, images appear when:

  • the data control is showing the default data set
  • the data control is showing a different (non-default) data set and the Image field is serving images from a trusted domain. Currently, this includes most Google domains.

If the data control is showing a different (non-default) data set and images are requested from an untrusted domain, images won't appear. Instead, the table will display the image URL. Report viewers can click the URL to view the image, and are shown a dialog asking them to make sure the link goes to a trusted domain.

Images in copied data sources

When you copy a data source, all Image fields are disabled in the copy. You can re-enable images by doing the following:

  1. Edit the data source
  2. For each field you want to enable, click More options.
  3. Select Enable.

 

Was this helpful?

How can we improve it?
true
What's new in Looker Studio?

Learn about new features and recent changes. Looker Studio release notes live on Google Cloud.

Search
Clear search
Close search
Google apps
Main menu
9782181105753810940
true
Search Help Center
true
true