
Import Web Images in Excel — The Easiest Way to Put URL Images in Cells
To display a web image (URL) directly inside an Excel cell, use the IMAGE function. For large lists, collect URLs with Power Query (From Web), then render them all at once with a spill formula.
Quick Fix: Done in 30 Seconds
- Paste image URLs into column A (https is recommended).
- Enter this in B2:
=IMAGE(A2, "Product image", 0) - For bulk application:
=IMAGE(A2:A100)Or, for safer compatibility:
=MAP(A2:A100, LAMBDA(u, IMAGE(u)))
IMAGE Function Overview (Syntax and Options)
=IMAGE(source, [alt_text], [sizing], [height], [width])
- source: An https URL is recommended.
- alt_text: An accessibility description.
- sizing: 0 = fit (default) / 1 = fill / 2 = original size / 3 = custom (px)
Practical Example
| A (URL) | Description |
|---|---|
| https://example.com/img/a.png | Product A |
| https://example.com/img/b.jpg | Product B |
Fit, Fill, Original Size, and Custom Size
=IMAGE(A2, "fit", 0)
=IMAGE(A2, "fill", 1)
=IMAGE(A2, "original", 2)
=IMAGE(A2, "120px", 3, 120, 120)
Automatically Collect URLs with Power Query
- Select Data > From Web → enter the address.
- If needed, add headers or queries under Advanced.
- Keep and clean only the URL column → select Close & Load.
- In a cell next to the URLs loaded to the worksheet, enter
=IMAGE([@URL])or a spill formula.
Checklist
- URLs should use https and be publicly accessible.
- Formats: JPG/PNG/GIF/TIFF/ICO/WEBP (availability may vary by environment).
- Use spill formulas outside tables. If the spill range is blocked, clear the range.
- If hotlinking is blocked, copy the image to the WordPress uploads folder and replace the URL.
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| #N/A/blank | Access blocked, http, or an incorrect path | Use a public https URL or upload the image to your own server. |
| WEBP display issue | Limited client support | Convert it to JPG or PNG. |
| #SPILL! | The spill range is blocked. | Clear the range and use the formula outside a table. |
| Distorted aspect ratio | sizing=1 | Use 0 or 3 (specify pixels). |
Related Posts
- IMAGE Function Guide
- Power Query — Import from the Web
- Understanding Dynamic Arrays and SPILL
- Organize Data into One Column with TOCOL
- Clean Text with TRIM and CLEAN
Official documentation: Microsoft: IMAGE · Picture in cell · Power Query: Web.Contents