HomeGoogle DocsSpreadsheetHow to Use Image Function and Vlookup Images in Google Sheets

How to Use Image Function and Vlookup Images in Google Sheets

Published on

This Google Sheets tutorial is about Image VLOOKUP and IMAGE function. I haven’t shared so far how to use Image function in Google Sheets. You can learn that awesome tips in this tutorial and additionally you can learn here how to use Vlookup function to lookup images in Google Sheets.

Earlier I’ve shared the tips to copy and paste images from Excel Spreadsheets into Google Sheets. But you can insert images in Google Sheets using Image function.

You only need the URL of the image to insert. You can either upload your images to free image hosting services and get the URL or find public domain images online.

There is a certain advantage in using the Image formula in Google Sheets. Mainly you can resize the inserted images in different ways to fit the cell. Also as I’ve already said, you can use Vlookup function to lookup images in Google Sheets.

First, learn the use of Google Sheets Image function. Then you can learn how to do Image Vlookup in Google Sheets.

How to Use Image Function in Google Sheets

Syntax:

IMAGE(URL, [MODE], [HEIGHT], [WIDTH])

To make you understand the above syntax arguments, let me draw your attention to the below screenshot. See one image inserted using the Image formula.

Google Sheets Image Function

Below is the Image formula that returned the above image.

=IMAGE("https://sites.google.com/site/tepfanclub/home/jabal-jaise.jpg")

Additional Tips:

When you copy the image URL, please make sure that you are copying the image URL, not page URL.

To get Image URL that can work in Google Sheets Image function, right-click on the image on the web page and you can see the shortcut saying “copy image address”. The URL that ending PNG or JPG is required to use in this formula.

Now learn how to use image function with different MODES as per the syntax. Google Sheets Image function supports 4 different modes.

Image Mode 1 Default and Recommended – It Keeps the Image Aspect Ratio

=IMAGE("https://sites.google.com/site/tepfanclub/home/jabal-jaise.jpg",1)

I recommend you to use this mode. You can omit to put the Mode number at the end of this formula as by default Google Sheets recognizes the mode as 1.

Google Sheets Image function Mode #1 can maintain the aspect ratio of the original image and resizes it to well fit inside the cell.

In all the image modes, when you adjust row height and width, the image got adjusted accordingly. The above screenshot is an example of Image Mode 1.

Image Mode 2. It Stretches the Image – Not Recommended as It Ignores the Image Aspect Ratio

=IMAGE("https://sites.google.com/site/tepfanclub/home/jabal-jaise.jpg",2)

I don’t recommend you to use this image mode as it stretches the image to fit inside the cell. That means it ignores the image aspect ratio. The image may look ugly in some cases.

Image Mode 3 – This Mode Inserts the Original Image and Suitable If the Image Size Is Too Small

=IMAGE("https://sites.google.com/site/tepfanclub/home/jabal-jaise.jpg",3)

Image mode 3 is also not recommended. It keeps the original image size. If the cell is small to accommodate the image, it crops the image.

Image Mode 4 – Custom Size

=IMAGE("https://sites.google.com/site/tepfanclub/home/jabal-jaise.jpg",4,300,250)

In this Google Sheets Image formula, you can specify the height and width of the image to insert.

Just put the ‘required’ height and width of the image after the image mode number 4.

May be useful in certain cases like when you want to insert multiple images. In such cases, you can set the size of all images as same. But cropping may be applied.

You have now already learned how to use the IMAGE function in Google Sheets. Now time to learn how to use Image Vlookup in Google Sheets.

How to Lookup Images in Google Sheets Using Vlookup

If you are new to Vlookup I recommend you to learn the Vlookup function in detail. Here are two useful links to learn Vlookup.

  1. Learn Vlookup and Hlookup.
  2. Vlookup Array Use.

There are several advanced Vlookup tutorials on this site. You can use the search field on the top navigation bar to find it.

Google Sheets Vlookup can return Images as output from the index column number. See one example.

The below sample data for the Image Vlookup is showing a restaurant’s menu items including item name, ingredients used, required time to serve, price and photo of the item.

In another sheet or same sheet, you can use Vlookup to return the required item details.

You can use Vlookup to search down the item name in column A and return its price, serve time, ingredients, photo or the entire row as it’s.

Image Lookup in Google Sheets

First I’m using Vlookup to return image only based on the item “Tomato Soup” as lookup key/search key.

Image Vlookup Example Formula:

=vlookup("Tomato Soup",'Lookup Image'!A2:E3,5,FALSE)

This formula returns the below image.

Vlookup formula to lookup images in Google Sheets

Now I’m modifying this formula to return the entire row values. This technique is called Vlookup in Array.

=ArrayFormula(vlookup("Tomato Soup",'Lookup Image'!A2:E3,{1,2,3,4,5},FALSE))

This formula would return all 5 columns in our sample data that means the entire row that contains the lookup search key “Tomato Soup”.

See the use of Curly Braces to show multiple index numbers in Vlookup and the ArrayFormula in the beginning.

Note: The lookup image would be as per Image Mode 2. That means it’s stretched to fit the cell.

Practical Use of Image Lookup in Google Sheets

There are many uses of image lookup. For example, if you are a teacher you can use this feature as below.

Use the Image function to insert images of different plants, animals, fruits, the map of countries like any useful images in one Google Sheet for your students to learn.

In another sheet, you can create a drop-down menu for students using data validation.

The drop-down menu should contain the name of plants, animals, etc. Based on the drop-down selection (Vlookup search key) the image of the item will appear. So useful for a teacher to introduce new things to students.

I mean, if you have a list in one sheet tab with the country names and country photos, when a student selects a country name from a drop-down in another tab, the relevant country’s image will be populated (using Vlookup).

Hope you could learn how to use Image function in Google Sheets and how to do an Image Lookup. Thanks for the stay. Enjoy!

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

Analyzing Column A Between Non-Adjacent Values in Column B: Google Sheets

This tutorial addresses a common scenario encountered in Google Sheets: how to sum, average,...

Excel Word Count: Beyond SUBSTITUTE

You might want to count the number of words in a cell in Excel...

Sum by Quarter in Excel: New and Efficient Techniques

Knowing how to sum by quarter is crucial in Excel because quarterly reporting has...

Sum By Month in Excel: New and Efficient Techniques

Suppose you prefer to sum by month in Excel using a formula. In that...

More like this

Analyzing Column A Between Non-Adjacent Values in Column B: Google Sheets

This tutorial addresses a common scenario encountered in Google Sheets: how to sum, average,...

Count Distinct Values in Google Sheets Pivot Table

There is a built-in function for counting distinct values in a Google Sheets Pivot...

Conditional Formatting for Pivot Tables in Google Sheets

Do you know how to dynamically restrict conditional formatting within the Pivot Table area...

1 COMMENT

  1. Good information. But is there any way through which I can copy images from one spreadsheet to another spreadsheet in google sheets on mobile?

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.