IMAGE Function

Excel Functions › Lookup & Reference

Excel 365 Lookup & Reference

The Excel IMAGE function (Excel 365 only) places a picture inside a cell from a web URL. Unlike floating pictures, an in-cell image sorts, filters, and moves with its row — perfect for product catalogues, logos, and dashboards. You control how it fits the cell with four sizing modes, and because it’s a formula, the picture can change based on a lookup.


Quick answer: to show a web image inside a cell, fitted to the cell while keeping its proportions:
=IMAGE("https://dfwexcel.com/logo.png", "Excel Experts logo")
The source must be an https URL to a supported format (PNG, JPG, GIF, TIFF, BMP, ICO, WEBP). Resize the cell and the picture follows.

Syntax

=IMAGE(source, [alt_text], [sizing], [height], [width])
ArgumentDescription
sourceRequiredThe https URL of the image. Supported formats: BMP, JPG/JPEG, GIF, TIFF, PNG, ICO, WEBP.
alt_textOptionalAlternative text describing the image for accessibility (screen readers).
sizingOptionalHow the image fits the cell: 0 = fit, keep aspect ratio (default); 1 = fill the cell, ignore ratio; 2 = original size; 3 = custom size from height/width.
heightOptionalImage height in pixels — only used with sizing 3.
widthOptionalImage width in pixels — only used with sizing 3.

Excel 365 only. IMAGE isn’t in Excel 2021 or earlier — older versions show #NAME?. The workbook also needs a connection to fetch the picture.

Worked examples: sizing modes and dynamic pictures

The sizing argument decides how the picture relates to the cell:

AB
1sizingBehaviour
20 (default)Fit in the cell, keep aspect ratio
31Fill the cell, ignore aspect ratio
42Original size (may overflow the cell)
53Custom size — uses the height and width arguments
=IMAGE("https://example.com/chart.png") // mode 0 implied: fit the cell, keep proportions
=IMAGE("https://example.com/texture.jpg", "Banner", 1) // stretch to fill the cell exactly
=IMAGE("https://example.com/icon.png", "Icon", 3, 24, 24) // pin to exactly 24 x 24 pixels

Because IMAGE is a formula, the picture can be looked up. With product names in column A and image URLs in a table:

=IMAGE(XLOOKUP(A2, Products[Name], Products[ImageURL]), A2) // picture changes with the product in A2

Try it: build an IMAGE formula

Live demo

Choose a sizing mode and alt text, and watch the formula take shape with an explanation of what Excel will do with the picture.

What Excel does:

Requirements, and IMAGE vs Picture-in-Cell

IMAGE has firm requirements:

  • https onlyhttp:// sources and local file paths (C:\...) are rejected with #VALUE!. To use a local picture, upload it somewhere web-accessible (SharePoint/OneDrive shared links can work if directly downloadable) or use Insert > Pictures > Place in Cell instead.
  • Supported formats — BMP, JPG/JPEG, GIF, TIFF, PNG, ICO, WEBP. SVG is not supported.
  • A live connection — Excel fetches the image; offline, cells may show #CONNECT! or a placeholder until reconnected.

IMAGE vs “Place in Cell”: Insert > Pictures > Place in Cell embeds a static local picture in a cell with no formula and no URL needed. Use IMAGE when the picture should be computed — driven by lookups, switched by dropdowns, or generated from a URL pattern like ="https://cdn.example.com/" & A2 & ".png".

Errors & common pitfalls

#VALUE! — bad source or arguments. The URL isn’t https, points to an unsupported format (e.g. SVG or an HTML page), or sizing/height/width are invalid (sizing must be 0–3; height/width only apply with 3).

#BLOCKED! — security settings. Your organisation’s policies or Trust Center settings block linked data types/external content, or the file is in a location where external content is disabled.

#CONNECT! / #BUSY! — fetching problems. Excel can’t reach the URL (offline, firewall, dead link), or is still downloading. #BUSY! usually resolves by itself.

#NAME? — older Excel. IMAGE only exists in Excel 365 (and Excel for the web). Anyone opening the file in Excel 2021 or earlier sees #NAME?.

Pitfall: URLs that aren’t direct images. A link to a page containing the picture fails — the URL must return the image file itself. Test by pasting the URL in a browser: you should see only the picture.

Practice workbook

📊
Download the free IMAGE practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

Which Excel versions have the IMAGE function?
Excel 365 (Windows, Mac, and the web) and Excel mobile. It is not in Excel 2021, 2019, or earlier perpetual versions - those show #NAME? when they open a workbook using it.
Can IMAGE use a picture from my computer?
No — source must be an https URL. For local pictures use Insert > Pictures > Place in Cell, which embeds the image in a cell without a formula, or host the file somewhere web-accessible first.
What do the sizing modes mean?
0 (default) fits the image inside the cell keeping its proportions; 1 fills the cell exactly, distorting if needed; 2 shows the image at its original pixel size, which can spill past the cell; 3 uses the height and width arguments for an exact pixel size.
How do I make the picture change based on a dropdown?
Store URLs in a lookup table and feed IMAGE from XLOOKUP: =IMAGE(XLOOKUP(A2, Products[Name], Products[ImageURL]), A2). Changing the dropdown in A2 swaps the picture instantly.
Why does IMAGE show #BLOCKED!?
Security settings are preventing Excel from downloading external content - typically organisation policy on linked data types, Trust Center restrictions, or a distrusted file location. Check File > Options > Trust Center, or ask your admin.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: HYPERLINK · XLOOKUP · INDIRECT · FILTER