Floating product photos on top of an Excel spreadsheet always break the moment you sort a table, filter a category, or resize a column. With the IMAGE function in Excel, you can pull web-hosted images directly inside worksheet cells using a formula—so every picture moves, sorts, and filters cleanly alongside its row data.
Availability & Caveats: Per the official IMAGE function documentation, IMAGE is available in Excel for Microsoft 365 (Windows, Mac, Web, iPhone, and Android) and Excel 2024 (Windows and Mac), as well as Google Sheets. Older perpetual versions such as Excel 2021 and Excel 2019 do not support it and display #NAME?. Also note that URLs must use the https protocol, and WEBP images are not supported on Excel for the web or Android.
Table of Contents
How the IMAGE Function in Excel Works (Syntax & Sizing Modes)
The IMAGE function fetches a picture from an HTTPS URL, attaches optional accessibility alt text, and scales it inside the cell according to one of four sizing modes:
=IMAGE(source, [alt_text], [sizing], [height], [width])
- source (Required): The full
https://URL of the image file (in quotes or a cell reference). Supported formats includeBMP,JPG/JPEG,GIF,TIFF,PNG,ICO, andWEBP(desktop/Mac only). - [alt_text] (Optional): Descriptive alternative text for screen readers and accessibility.
- [sizing] (Optional): Controls how the picture scales inside the cell:
0fits inside the cell while keeping aspect ratio (default),1fills the entire cell ignoring aspect ratio,2keeps original pixel dimensions (may overflow), and3uses custom pixel dimensions. - [height] & [width] (Optional): Custom pixel dimensions used only when
sizingis set to3. If you supply only height or only width, Excel scales the other dimension proportionally.
Step-by-Step Catalog Example (Fit vs. Custom 80×80)
Suppose your Practice sheet lists five hardware SKUs in A6:D10, with HTTPS image links in Column C and alt text in Column D. To display each product thumbnail neatly inside Column E while preserving its aspect ratio, enter:
=IMAGE(C6, D6, 0)
Want uniform 80×80 pixel thumbnails in Column F regardless of row height? Switch sizing to 3 and pass both pixel dimensions:
=IMAGE(C6, D6, 3, 80, 80)
Keep in mind that if you copy a very long image URL from a browser, Excel’s formula bar has a 255-character string limit for inline literals—so always paste the URL into a cell (like C6) and reference that cell rather than pasting the raw URL inside quotes.
Excel IMAGE vs. Google Sheets IMAGE (Sizing Mode Differences)
Although both Microsoft Excel and Google Sheets share the IMAGE function name, their arguments and mode numbers are not identical—a common source of broken cross-platform formulas:
| Behavior | Excel (M365 / 2024) | Google Sheets |
|---|---|---|
| Syntax | =IMAGE(source, [alt_text], [sizing], [h], [w]) | =IMAGE(url, [mode], [h], [w]) |
| Fit Cell (Keep Ratio) | sizing = 0 (default) | mode = 1 (default) |
| Stretch / Fill Cell | sizing = 1 | mode = 2 |
| Original Size | sizing = 2 | mode = 3 |
| Custom Pixel Size | sizing = 3 | mode = 4 |
| Drive / SVG Support | HTTPS public links | No drive.google.com or SVG |
Troubleshooting #BLOCKED!, #VALUE!, and #NAME? Errors
- #BLOCKED! error: Per Microsoft Support, Excel displays
#BLOCKED!when workbook security settings block external Linked Data Types or web images. Click Enable Content on the security bar (or check Trust Center settings for Linked Data Types). - #VALUE! error: Returned if the URL uses
http://instead ofhttps://, points to an unsupported file format, setssizingoutside0–3, usessizing = 3with blank dimensions, or passesheight/widthwith sizing0,1, or2. See our guide on how to fix the #VALUE! error in Excel. - #NAME? error: The workbook was opened in Excel 2021 or earlier, where
IMAGEis unavailable—check our guide to fixing #NAME? errors in Excel.
Frequently Asked Questions
Download the practice workbook
The same data as this tutorial, with empty answer cells and a Solutions sheet.