IMAGE Function

Places a picture from the web directly inside a cell.

Category

Lookup & Reference

Available in

Microsoft 365

Returns

An image inside the cell

Overview

IMAGE loads a picture from a URL and shows it inside the cell — it moves, sorts and filters with your data like any other value.

The source must be an https address of a supported file type (such as PNG, JPG, GIF or WEBP).

Syntax

=IMAGE(source, [alt_text], [sizing], [height], [width])

Arguments

ArgumentRequired?What it does
sourceYesThe https URL of the image.
alt_textOptionalA description for accessibility.
sizingOptional0 = fit in cell (default), 1 = fill cell, 2 = original size, 3 = custom height/width.
heightOptionalHeight in pixels (sizing 3 only).
widthOptionalWidth in pixels (sizing 3 only).

Examples

Example 1 — A product photo

B2 holds an image URL. Show the picture in C2.

=IMAGE(B2, "Product photo") Explain

Example 2 — Looking up a picture

Combine with XLOOKUP so the photo changes when a different product is picked.

=IMAGE(XLOOKUP(F1, A2:A50, B2:B50), F1) Explain
Make rows taller to make images bigger — with sizing 0 the picture scales to fit the cell.

Common mistakes

  • #VALUE! or #CONNECT! The URL isn't https, the format isn't supported, or the site blocks the request.
  • Image disappears offline. The picture is loaded from the web, not stored in the file.

Notes

Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.