ShareYourGroupShareYourGroupGoogle Sheets

Web and import

IMAGE function in Google Sheets

IMAGE shows a picture from a web address inside a cell.

IMAGE puts a picture inside a cell, so that it moves, sorts and filters with its row. A product list can carry a photo of each item. A staff directory can show faces. Because it is a formula, a column of web addresses becomes a column of pictures at once.

No results are shown here, since the result is a picture and depends on a real address.

Syntax

=IMAGE(url, [mode], [height], [width])
ArgumentWhat it is
urlThe web address of the picture, starting with https, in quotation marks or in a cell.
mode1 fits the picture inside the cell and keeps its shape (the default). 2 stretches it to fill the cell. 3 shows it at its real size. 4 uses the height and width you give.
height, widthFor mode 4: the size in pixels.

Examples

How it works

Give the full web address of an image file. Sheets fetches the picture and draws it in the cell. Make the row taller and the column wider to see it at a useful size. The picture scales with the cell in modes 1 and 2.

The four modes

ModeBehaviourUse it for
1fits inside the cell, shape keptmost cases
2stretched to fill the cellbackgrounds, colour swatches
3original size, cropped if too bigsmall icons
4the size you stateuniform thumbnails

The address must be public

Sheets' servers fetch the picture, so it has to be reachable by anyone on the internet without signing in.

If the cell stays empty or shows an error, open the address in a private browser window. If the picture does not appear there by itself, IMAGE cannot show it either.

Formula or inserted picture?

Sheets has two other ways to add a picture.

Use the IMAGE function when you already have web addresses, when the list is long, or when the pictures should change as the addresses change. Use the menu for a logo or a one-off picture.

A QR code or chart in a cell

IMAGE can show anything that a web address returns as a picture, including images generated on request by a web service from values in the sheet. If you build an address from cell values this way, remember that those values are sent to that service. Use only services you trust, and never send private data in an address.

In lists and lookups

Because the picture is the result of a formula, it can be looked up. =VLOOKUP(E2, A2:C50, 3, FALSE), where column C holds IMAGE formulas, returns the picture for the chosen item. That is the basis of a simple catalogue page: pick a code from a drop-down and see the item's photo.

Speed

Each IMAGE cell is a separate download. A few dozen are fine. Hundreds make a sheet slow to open, and the pictures appear one by one. Use small image files.

Common mistakes

In Excel

Microsoft 365 has an IMAGE function with a similar purpose and different arguments. Excel 2021 and earlier have none. Pictures made by the Sheets formula do not carry over to an Excel file.

Related functions

The results on this page were worked out by us from the sample sheet; they were not produced by a script running Google Sheets. If Sheets shows you something different, please tell us.

This is an independent help site. It is not connected with or approved by Google. Google Sheets is a trademark of Google LLC, named here only to say which program a formula is for. The people and figures in the sample sheets are made up.