IMAGE Function in Excel: Insert and Resize Pictures Inside Cells With Formulas

Isometric spreadsheet illustration showing the IMAGE function in Excel placing pictures inside cells

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.

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 include BMP, JPG/JPEG, GIF, TIFF, PNG, ICO, and WEBP (desktop/Mac only).
  • [alt_text] (Optional): Descriptive alternative text for screen readers and accessibility.
  • [sizing] (Optional): Controls how the picture scales inside the cell: 0 fits inside the cell while keeping aspect ratio (default), 1 fills the entire cell ignoring aspect ratio, 2 keeps original pixel dimensions (may overflow), and 3 uses custom pixel dimensions.
  • [height] & [width] (Optional): Custom pixel dimensions used only when sizing is set to 3. 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:

BehaviorExcel (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 Cellsizing = 1mode = 2
Original Sizesizing = 2mode = 3
Custom Pixel Sizesizing = 3mode = 4
Drive / SVG SupportHTTPS public linksNo 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 of https://, points to an unsupported file format, sets sizing outside 0–3, uses sizing = 3 with blank dimensions, or passes height/width with sizing 0, 1, or 2. See our guide on how to fix the #VALUE! error in Excel.
  • #NAME? error: The workbook was opened in Excel 2021 or earlier, where IMAGE is 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.

Team Xl in Excel

Team Xl in Excel

Spreadsheet Architect & Educator at Xl in Excel. Sharing advanced formulas, dynamic arrays, and clean data modeling techniques.

Learn More About Team Xl in Excel →

Leave a Reply

Your email address will not be published. Required fields are marked *

Zoom: 100% | UTF-8 | Xl in Excel