Yes. In Excel for Microsoft 365, use the IMAGE function to show an online picture inside a cell. With a direct HTTPS image URL in A2, enter =IMAGE(A2) in B2; the picture appears in B2 and adjusts to the cell by default.
What the IMAGE formula does
IMAGE retrieves an image from a URL and displays it as cell content rather than as a separate picture floating above the worksheet. That difference matters: an in-cell image moves and sorts with its cell, while a floating image can cover neighboring cells and may need to be repositioned after rows or columns change.
The function is useful when image links are already part of a list, such as a product catalog, staff directory, property register, or inventory sheet. A formula can use the URL stored in another cell, so each row can display a different image without manually inserting each file. It does not turn an image stored only on your computer into a URL, however, and it does not make a private image link publicly available.
The function is available in Microsoft 365 versions of Excel, including Excel for Windows, Mac, and the web. If a workbook will be opened in an older Excel release that does not support the function, the recipient may not see the image correctly. Confirm compatibility before relying on IMAGE in a workbook shared across different Excel versions.
IMAGE syntax and sizing options
The function accepts a source URL, optional alternative text, an optional sizing mode, and optional dimensions. With the image URL in A2, this formula displays it with descriptive alternative text: =IMAGE(A2,"Blue ceramic mug"). Alternative text gives a text description for accessibility and can help explain the image if it cannot be displayed.
The sizing argument controls how the image fits. With a URL in A2, =IMAGE(A2,"Blue ceramic mug",0) fits the whole image inside the cell and preserves its aspect ratio. This is the default behavior when the sizing argument is omitted, and it is usually the best starting point for product photos or thumbnails.
- 0: Fit the image inside the cell while preserving its proportions. Empty space may remain in one direction.
- 1: Fill the cell, which can distort the image if the cell and image have different proportions.
- 2: Show the image at its original size, which may extend beyond the cell boundaries.
- 3: Use a custom size. Supply height and width in pixels as the fourth and fifth arguments.
For example, with a URL in A2, =IMAGE(A2,"Blue ceramic mug",3,80,120) requests an image 80 pixels high and 120 pixels wide. The displayed result still depends on the worksheet’s row and column dimensions, so adjust those if the image looks clipped or too small. Custom sizing is useful for a consistent thumbnail grid, but forcing different-shaped photos into identical dimensions can stretch them.
How to insert an image with a formula
Use a direct link to the image file or image resource, not merely the address of a webpage that contains a picture. A product page, search result, or shared-folder landing page may not return the image itself when Excel requests it. The link needs to be accessible over HTTPS without an interactive sign-in.
- Put a direct HTTPS image URL in a cell, such as A2. If you have many images, place one URL on each corresponding row.
- Select the cell where the image should appear, such as B2.
- Enter the formula
=IMAGE(A2,"Product image")and press Enter. Here, the URL is in A2 and the image is displayed in B2. - Resize column B and the relevant row to give the picture enough room. Copy the formula down for additional rows; relative references will change from A2 to A3, A4, and so on.
For a single fixed image, the URL can instead be written directly in the formula. With no URL in another cell, enter =IMAGE("https://example.com/mug.png","Blue ceramic mug"). The domain and file name here are illustrative: replace them with a real, publicly accessible image URL. Keeping URLs in a separate column is usually easier to maintain because you can update a link without editing the formula.
On Windows, enter the formula in the formula bar or directly in the selected cell. Excel for Mac and Excel for the web use the same function syntax, though ribbon layouts and feature availability can vary by update. The comma-separated formulas shown here are standard English-language Excel syntax; some regional configurations use a different list separator.
Choosing between IMAGE and Place in Cell
IMAGE is a good choice when the image should change along with a URL, when many rows need thumbnails, or when the source list is maintained elsewhere. It keeps the worksheet formula-driven and makes it straightforward to update a collection by changing the links. The trade-off is dependence on external web access and on image URLs that continue to work.
If the picture is a local file, should remain available offline, or must travel with the workbook without relying on a remote link, insert or convert it as an in-cell picture instead. In supported Microsoft 365 Windows builds, select a cell and choose Insert > Pictures > Place in Cell > This Device to select a file. The exact choices under Pictures can differ by update and source. Excel also offers a command to place an existing floating picture in a cell through its picture context menu in supported builds.
These approaches are not interchangeable. A placed picture is an image object stored in the workbook, while IMAGE is a formula whose source is a URL. A formula cannot browse your computer for a file path and embed it automatically. Conversely, a manually placed picture will not update simply because the URL in a neighboring cell changes.
Practical layout and workbook design
Plan the worksheet dimensions before adding a large batch of pictures. A thumbnail column with a consistent width and rows with a consistent height is easier to scan than images displayed at arbitrary sizes. For preserving the full photo, choose sizing mode 0 and make the cells large enough for the intended thumbnail. If you use mode 1 to fill every cell, inspect the result for distortion.
Keep each image URL and its related record on the same row. For example, a product table might have a SKU in column A, a product name in B, an image URL in C, and the displayed image in D. The layout makes it easier to sort and filter the records while retaining their associations. With the URL in C2, enter =IMAGE(C2,"Product photo") in D2, then fill the formula down for the remaining records.
Use meaningful alternative text when the image conveys information that a screen-reader user needs. A label such as “Front view of blue ceramic mug” is more useful than “Image.” If the picture is purely decorative or duplicates a nearby product name, avoid adding unnecessary descriptions. Alternative text is not a caption displayed beside the picture; add a separate column or cell for visible labels.
Before sharing, consider who can access the image host. A URL that works for you while signed in may fail for a colleague, because the function may not be able to use your browser session or a site’s sign-in page. Use links that the intended viewers can access under the organization’s sharing rules, and avoid putting confidential images on public hosting services just to make a formula work.
Common errors and troubleshooting
If a picture does not appear, first check the URL itself. Open it in a browser window where you are not already signed in, if appropriate, and verify that it leads to an image rather than a webpage or a download page. Confirm that the address uses HTTPS and that the host has not expired the link, blocked automated requests, or required a login.
- A blocked or access error: The source may require authentication, be restricted by an organization’s security settings, or come from a location Excel cannot retrieve. Ask the image host or administrator about an accessible approved location.
- A connection error: Check the internet connection, proxy or firewall rules, and whether the image host is temporarily unavailable. A working URL may still fail if Excel cannot reach that server.
- An invalid-value error: Check for a typo, a blank source cell, an unsupported response, or invalid sizing arguments. For custom sizing, provide both height and width as positive pixel values.
- An image that looks stretched or clipped: Try sizing mode 0, then adjust the row height and column width. Mode 1 intentionally fills the cell and can change the image’s proportions.
- A blank result after copying the formula: Make sure each row’s URL cell contains a valid link and that the copied formula points to the intended row.
Also check whether the cell contains a formula that Excel recognizes. If you see the formula text rather than a picture, the cell may be formatted as Text, or the formula may have been entered with a leading apostrophe. Change the cell format to General, then re-enter the formula. If calculation or external content is restricted by workbook or organization settings, follow the applicable administrator guidance rather than weakening security controls.
Limitations to understand before relying on it
An IMAGE formula references online content, so it is not a guarantee that a picture will remain available forever. The host may move or delete the image, change access permissions, or alter its response. A workbook containing such formulas may therefore show different results later or on a computer that cannot reach the host. Keep a record of the source and use stable, permitted image links.
IMAGE does not scrape a webpage for the first picture it finds, nor does it extract an image from a filename or product code by itself. It needs a usable image source URL. If you need to construct URLs from a structured naming scheme, a separate formula or data process may be able to assemble the text, but the resulting address still has to be valid and accessible to Excel.
There can also be practical performance costs in a worksheet with many remote images. Each image depends on retrieval from a server, and slow or restricted connections can delay display. For a large catalog, test a representative sample and consider whether a linked display or workbook-embedded pictures better fit the file’s audience, offline needs, and maintenance process.
Frequently Asked Questions
Can I put a picture in an Excel cell using a formula?
Yes. In Microsoft 365, use IMAGE with a direct HTTPS image URL. With the URL in A2, enter =IMAGE(A2) in the cell where the picture should appear. The image is displayed as cell content, not as a manually embedded local file.
Can IMAGE use a picture saved on my computer?
Not by referring to a normal local file path. IMAGE expects an online image source URL that Excel can retrieve. To include a local picture in the workbook, use a supported Place in Cell option or insert a picture as an object instead.
Why does my Excel image formula show an error?
The URL may point to a webpage instead of an image, require a sign-in, use an unsupported or inaccessible source, or be blocked by network policy. Check the link in a browser, confirm HTTPS, and review the function’s sizing arguments and the source cell.
Will the image stay in the workbook if I send it to someone?
Do not assume so when it is displayed by IMAGE. The formula uses a URL, so the recipient needs access to the source and a compatible Excel version. For a picture that must travel with the workbook and work offline, use an in-cell or embedded picture option.
How do I make all the pictures the same size?
Use consistent row heights and column widths, then apply the same sizing mode to each formula. Mode 0 preserves the full image but may leave empty space; mode 1 fills the cell but may stretch the picture. Choose based on whether proportions or uniform filled thumbnails matter more.
Related
- Sum in Excel From Different Sheets: A Step-by-Step Guide
- Subtract Time in Excel to Get Hours as Decimal Hours
- How to Sum a Column in Excel With a Shortcut
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- How to Install XLOOKUP in Excel and Check CompatibilityYou do not install XLOOKUP as a separate Excel feature or add-in: it is already built into supported…
- Excel SUMIFS Between Two Dates: Formula and ExamplesTo sum values in Excel between two dates, use SUMIFS with the date range as a criteria range…
- How to Sort Dates in Excel PivotTables the Right WayTo sort dates in an Excel PivotTable, click a date label, right-click it, and choose Sort > Sort…
- Excel Formula to Split Text in a Cell: A Practical GuideIn Excel for Microsoft 365, split text in a cell with =TEXTSPLIT(A2,","), replacing the comma with the character…
- Excel Wildcard XLOOKUP: Find Partial MatchesYes. In Microsoft Excel for Microsoft 365, XLOOKUP can find a partial text match when you set its…
- Using the IFS Function in Excel: Syntax and ExamplesIn Excel, use IFS to test conditions in order and return the result paired with the first condition…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.