RuffRuff App RuffRuff App by Tsun

[Looker Studio] How to Use the IMAGE Function and Practical Examples | Calculated Fields

[Looker Studio] How to Use the IMAGE Function and Practical Examples | Calculated Fields

[Looker Studio] How to Use the IMAGE Function and Practical Examples | Calculated Fields

In this article, we will clearly explain how to use the IMAGE function in Looker Studio and specific examples of its application. Utilize the functions available in Looker Studio to process and visualize your data.

The IMAGE function is a function used in Looker Studio reports to display images. We will also introduce methods for displaying images without using functions and reports that apply the IMAGE function.

What are Calculated Fields in Looker Studio?

Calculated Fields in Looker Studio are a handy feature that allows you to create custom fields by using operators (such as addition, subtraction, multiplication, division), functions, and regular expressions based on existing items for use in reports.

Also, for basic usage of Looker Studio, please refer to the "How to Use Looker Studio" guide. Looker Studio is a very convenient tool that is free to use and allows for the creation of easy-to-understand reports by connecting to various data sources, so let's make active use of it.

What is the IMAGE Function?

The IMAGE function is a function used to display images in a report via a URL. Therefore, only images that have a URL can be displayed. It directly shows images obtained from external sources such as product photos, logos, and thumbnails within the report.

Syntax

The syntax of the IMAGE function is as follows:

IMAGE("image URL", "alternative text")

Specify the image you want to display in "image URL".

"Alternative text" is an optional item. It is used as a description when the image cannot be displayed or is not viewable.

Important Points to Note When Using the IMAGE Function

Specifying the Type of Graph

Images can only be displayed when the graph format is set to a table.

Specifying the Image Extension

To display an image, the image file extension must be jpg. Please be aware that other formats, such as png, cannot be displayed.

How to Use the IMAGE Function

To use the IMAGE function, you must create a calculated field in Looker Studio. There are two types of calculated fields: data source calculated fields and chart-specific calculated fields. In this article, we will create a data source calculated field, but for more details on the differences between them, please see the section on differences between data source calculated fields and chart-specific calculated fields.

Since GA4 data sources do not contain image URLs, we will use sample data created in a spreadsheet for this example. In the latter part of the article, we will also discuss examples of integration with GA4 data.

Use Case:Displaying Blog Thumbnail Images in Looker Studio 

First, create the following spreadsheet and set up a data source in Looker Studio.

Column A contains the image URLs you want to display, and column B contains optional alternative text. Column C's page path will be used in another example to integrate with GA4 data.

lookerstudio-image-function-data
(Quote:Google Sheet)

 

Next, we will configure the calculated field in the data source we created as follows: 

lookerstudio-image-function-setting

(Quote:Looker Studio) 

  1. Field Name: Please enter any field name.

  2. Formula: IMAGE(imageURL, alt)

  3. Save: Once you have entered the information, click Save.

This will create a field called "thumbnail.

lookerstudio-image-function-metric

(Quote:Looker Studio)

 We will use the field we created in the report. Setting up the Looker Studio report as follows will display the thumbnail image. 

lookerstudio-image-function-graph
(Quote:Looker Studio)

 

Methods to Display Images Without Using the IMAGE Function

If you want to use images in a table and combine them with other dimensions or metrics, you need to use the IMAGE function. However, if you simply want to display an image within a report, there are other methods available.

First, select the image menu as shown below.

lookerstudio-image-insert

(Quote:Looker Studio)

Enter the image URL and click insert.

lookerstudio-image-url

(Quote:Looker Studio)

Then, the image appeared as follows. 

 

lookerstudio-image-display

(Quote:Looker Studio)

How to Display Images in Conjunction with GA4 Data

By using an integrated data source that allows the creation of a single graph by consolidating multiple data sources, you can also create tables like the one below by linking a data source that uses the IMAGE function with a GA4 data source.

lookerstudio-image-ga4

 (Quote:Looker Studio)

Here, we have created an integrated data source by linking the page path column of a spreadsheet that has loaded the image URL with the page path dimension of GA4. This has allowed us to add the number of page views corresponding to the image to the table. With this method, for example, you can create visually understandable tables, such as visualizing the thumbnails and views of a blog.

Relevant Looker Studio Official Documentation

Looker Studio Official Help : About calculated fields

Looker Studio Official Help : Function list

 

Back to blog

Featured collection