IMAGE function
IMAGE pulls a picture from a web address into a cell, so the image moves and sorts with your data, like product thumbnails. It needs an internet connection, and only https addresses work.
Example
=IMAGE("https://example.com/logo.png","Logo")
Expected result: n/a Not yet checked in desktop Excel
Syntax
IMAGE(source, [alt_text], [sizing], [height], [width])
Arguments in [square brackets] are optional.
-
source(required) - URL of the image (https; PNG, JPG, GIF, SVG and others).
-
alt_text(optional) - Description for accessibility.
-
sizing(optional) - 0 fit to cell (default), 1 fill, 2 original size, 3 custom height and width.
-
height(optional) - Custom height in pixels when sizing is 3.
-
width(optional) - Custom width in pixels when sizing is 3.
Returns: A picture shown inside the cell.
What Excel actually returns
Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.
| Formula | Excel shows | Case |
|---|---|---|
=IMAGE("abc") | #VALUE! | Source not a URL |
=IMAGE("https://example.invalid/x.png") | #VALUE! | Unreachable host |
=IMAGE("") | #VALUE! | Empty source |
Watch out for
- Only https URLs work.
- Images are loaded live, so broken links show an error.
- Not available in older perpetual versions.
Where it works
- Excel
- IMAGE is only in Excel for Microsoft 365 and Excel for the web. 365 and Excel for the web; needs an internet connection.
- Google Sheets
- Same name, but behaves differently. Sheets IMAGE(url,[mode],[height],[width]) uses different arguments and mode numbers (1 fit, 2 stretch, 3 original, 4 custom).
Part of Lookup and reference functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .