IMAGE Function
IMAGE inserts a picture from a URL into a spreadsheet cell and lets you control its size and cropping.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| url | The URL of the image to display. Must be a direct link to an image file (e.g., .png, .jpg, .svg). | Required |
| mode | Sizing mode: 1 = resize to fit, 2 = stretch to fill, 3 = original size, 4 = custom size. Default is 1. | Optional |
| height | Image height in pixels. Used with mode 4. | Optional |
| width | Image width in pixels. Used with mode 4. | Optional |
Basic Example
Show a logo from a URL inside a cell
=IMAGE('https://example.com/logo.png')The image is fetched from the URL and displayed in the cell, resized to fit.
Advanced Examples
Example 1: Custom sized image
Product catalogDisplay a product image at a fixed 100x100 pixel size
=IMAGE('https://example.com/product.jpg', 4, 100, 100)Example 2: Image from a dynamic cell URL
Image galleryShow the image whose URL is stored in another cell
=IMAGE(A2, 2)How IMAGE Works
IMAGE fetches the image from the provided URL and renders it inside the cell. The mode parameter controls how the image is sized: fit, stretch, original size, or custom dimensions. The URL must be publicly accessible and point directly to an image file.
Important Notes & Limitations
IMAGE is Google Sheets only. Excel has limited support for images in cells via newer IMAGE function in some versions, but behavior differs.
The URL must be publicly accessible and directly link to an image file.
Images may not print or export to PDF consistently.
Some image hosting sites block direct linking.
Common Errors & Fixes
Image does not displayThe URL is not a direct image link or the site blocks embedding.Fix: Use a direct .jpg/.png URL and test it in a browser.
#VALUE! errorThe mode number is invalid or dimensions are missing for mode 4.Fix: Use 1, 2, 3, or 4. For mode 4, provide both height and width.
Very large imageMode 3 displays the image at original size, which may overflow the cell.Fix: Use mode 1 or 4 to resize the image.
Download Practice File
IMAGE
imagePractice IMAGE with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the IMAGE function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps