Lookup & reference function

IMAGE function

Places a picture from a web address inside a cell, so the image moves, sorts and filters with your data.

Available in Microsoft 365, Excel 2024, Excel for the web, Excel for Mac 2024+

Excel 2024 and laterDifferent in Google Sheets

Syntax

IMAGE(source, [alt_text], [sizing], [height], [width])
ArgumentWhat it means
sourceRequiredThe https web address of a picture in BMP, JPG/JPEG, GIF, TIFF, PNG, ICO or WEBP format.
alt_textOptionalA description for screen readers and accessibility.
sizingOptional0 fit the cell keeping proportions (default), 1 fill the cell ignoring proportions, 2 original size (may overflow), 3 custom size set by height and width.
heightOptionalHeight in pixels, only used with sizing 3.
widthOptionalWidth in pixels, only used with sizing 3.

Returns: A picture stored as the cell's value.

How IMAGE works

Before IMAGE, pictures in Excel floated on top of the grid and drifted out of place whenever you sorted or filtered. IMAGE puts the picture inside the cell as its value. Sort the product list and the photos travel with their rows; hide a row and its picture disappears too. That makes it ideal for product catalogues, staff directories, stock lists and dashboards with logos or flags.

The picture must be on the web at an https address that does not need a sign-in. By default it shrinks to fit the cell while keeping its proportions, so resizing the row height and column width is how you make it bigger. The sizing argument lets you stretch it to fill the cell, show it at its original size, or set exact pixel dimensions. Because the result is a value, you can pick a picture with a lookup - XLOOKUP(name, names, IMAGE(urls)) - or return images from FILTER.

Excel downloads the pictures when the workbook calculates. If your organisation blocks external content, the cell shows #BLOCKED!; a broken link or an unreachable site shows #CONNECT!.

Examples

1Photo in a product list

C2fx=IMAGE(B2, "Desk lamp photo")
ABC
1ProductPhoto URLPhoto
2Desk lamphttps://www.example.com/img/lamp.pngThe desk lamp picture, fitted inside C2
3Office chairhttps://www.example.com/img/chair.jpg

Result: The desk lamp picture, fitted inside C2

IMAGE downloads the PNG from B2 and displays it inside C2, scaled to fit the cell. Copy down to C3 for the chair. Make the row taller to see a bigger picture.

2Fixed size thumbnail

C3fx=IMAGE(B3, "Office chair", 3, 80, 80)
ABC
1ProductPhoto URLPhoto
2Desk lamphttps://www.example.com/img/lamp.png
3Office chairhttps://www.example.com/img/chair.jpgThe office chair picture at 80 x 80 pixels

Result: The office chair picture at 80 x 80 pixels

Sizing 3 shows the picture at exactly 80 x 80 pixels, regardless of the cell size. Make sure the cell is big enough or it will be cropped.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 13 KB

Common errors and how to fix them

ErrorWhy it happensFix
#VALUE!The file is not a supported image format, the address is not https, or sizing 3 was used without height/width.Use an https link to a PNG, JPG, GIF, BMP, TIFF, ICO or WEBP file.
#CONNECT!Excel could not reach the address (offline, broken link, or the site requires sign-in).Test the address in a browser and use a publicly reachable link.
#BLOCKED!Linked data types or external images are disabled by your settings or IT policy.Check File > Options > Trust Center > Privacy settings, or ask your administrator.

Tips

  • Pictures from a local drive are not supported; upload them to a web location (for example SharePoint or OneDrive with an anonymous link) first.
  • Use the alt_text argument - it is what screen readers announce and what other people see if the image fails to load.
  • In older versions of Excel the cell shows #NAME?, so keep the URL column visible for those users.

Google Sheets

Exists with different arguments: IMAGE(url, [mode], [height], [width]), where mode 1–4 sets the sizing; there is no alt_text argument.

IMAGE in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
CzechOBRÁZEK
DutchAFBEELDING
FinnishKUVA
GermanBILD
HungarianKÉP
Norwegian (Bokmål)BILDE
PolishOBRAZ
Portuguese (Brazil)IMAGEM
Portuguese (Portugal)IMAGEM
RussianИЗОБРАЖЕНИЕ
SpanishIMAGEN
SwedishBILD