To insert an image from a URL in Microsoft Excel for Microsoft 365, put the direct image address in a cell and use Excel’s IMAGE function, such as =IMAGE(A2) when the URL is in A2. The image appears inside the formula cell; for a picture that does not need to update from a URL, download it and insert it as a regular picture instead.
Why use IMAGE for a web picture?
IMAGE is the most direct way to display an online image in a worksheet while keeping its address in the workbook. Because the picture is returned by a formula, you can keep a list of products, locations, or other records alongside their images and change the URL in a row to show a different picture. This is useful for catalogs, inventory sheets, and reference tables where an image should stay associated with its data.
The key distinction is that IMAGE places the picture in a cell, rather than leaving it as a separate floating object over the worksheet. That makes it easier to arrange pictures in a table and keep them aligned with rows. It does not mean the image file is embedded in the workbook: Excel retrieves the picture from the address when it needs to display it. If the address stops working or the image is no longer accessible, the picture may not display.
How the IMAGE formula works
The IMAGE function has this general structure: =IMAGE(source,[alt_text],[sizing],[height],[width]). The source is usually a direct HTTPS address for an image, or a cell reference containing that address. The other arguments are optional. Alt text describes the image for accessibility, while sizing controls how the picture fits in its cell.
For example, with a direct image URL in A2, enter =IMAGE(A2) in B2. To add a description and specify a sizing mode, use =IMAGE(A2,"Blue mug",0). The second formula still reads the address from A2; “Blue mug” is the alt text, and 0 tells Excel to fit the picture inside the cell while preserving its proportions.
IMAGE is available in Microsoft 365 versions of Excel, including Excel for Windows and Excel for the web. If Excel does not recognize the function, check that the app is updated and that you are using a version that supports it. A workbook opened in an older Excel version may show a compatibility warning or may not display the formula result as intended.
Steps to display an image from a URL
- Find the image’s direct web address. It should point to the image file or image resource itself, not just to a page that contains the picture.
- Paste the address into a worksheet cell, such as A2. A column header such as Image URL can make the purpose clear.
- Select the cell where you want the picture to appear, such as B2, and enter
=IMAGE(A2). - Press Enter. If the picture is too small or the row is cramped, adjust the column width and row height, or select a sizing mode in the formula.
- For more records, put each URL on its own row and fill the formula down so each result uses the URL from the same row.
For example, if A2 contains the address for one item and A3 contains the address for another, put =IMAGE(A2) in B2 and fill it down to B3. The relative reference changes to A3, so each row shows the corresponding image. Keep the URL and image columns together when sorting the table so each picture remains associated with its record.
Choose a size and fit for the cell
By default, IMAGE uses sizing mode 0: it scales the image to fit within the cell and preserves the picture’s aspect ratio. This is a sensible starting point for product photos because it avoids stretching a square image into a rectangle. The result can leave blank space in the cell if the picture and cell have different shapes.
- 0: Fit the image inside the cell while preserving its aspect ratio.
- 1: Fill the cell, which can distort the image if the cell and picture have different proportions.
- 2: Show the image at its original size; it may extend beyond the cell’s visible area.
- 3: Set a custom height and width using the height and width arguments.
For a custom size, with the URL in A2, a description in the formula, and desired dimensions of 80 by 120 pixels, use =IMAGE(A2,"Item photo",3,80,120). The height argument comes before the width argument. These dimensions control the displayed image size; they do not change the source file. In a worksheet intended for printing or sharing, also check row heights and column widths because those determine how much of each cell is visible on the sheet.
What makes a URL suitable?
A common reason IMAGE fails is that the copied link is not a direct image address. A product-page URL, a search-results link, or a link to a page that requires clicking a thumbnail may return a web page rather than an image. When possible, open the picture itself in a browser and copy its image address. The exact browser wording varies, but options such as “Copy image address” or “Copy image link” are more likely to provide the right kind of URL than copying the page address.
The image must also be reachable by Excel. Microsoft documents that IMAGE requires an HTTPS source and that URLs requiring authentication are not supported. A picture visible to you because you are signed in to a website may therefore fail to load in a worksheet. Links that expire, require a session, or are restricted by an organization’s network can cause similar problems. A URL in a cell is not a way to bypass a site’s access controls.
If a website blocks external image requests or does not provide a stable direct link, ask the site owner for an approved image URL or use a permitted local copy. Do not assume that every image found online can be reused just because Excel can display it; copyright, licensing, and company policies still apply.
Fix common IMAGE problems
If the cell shows an error or no image, check the URL before changing the formula. Paste the address into a browser where you are not relying on a logged-in session, if appropriate for the content. If it opens a webpage, asks for a login, or reports that the file is unavailable, Excel may not be able to retrieve it as an image either.
- Check the address: Look for a typo, extra spaces, or a link that points to a webpage rather than the image.
- Check access: Confirm that the source uses HTTPS and does not require authentication. A workplace firewall or privacy setting may also restrict access.
- Check the file: Use a common image format supported by Excel, such as PNG or JPEG, and confirm the source is a valid image file.
- Check the cell: Increase the row height or column width, and try the default sizing mode if a custom size is hiding or distorting the result.
- Check the formula: Make sure the URL cell contains text and that the formula refers to the intended row.
Excel may show an error such as #VALUE! when it cannot use the supplied source, but the exact message can depend on the problem and the Excel version. If a link works in a browser but not in the worksheet, that does not necessarily mean the formula is wrong: the site may deliver the image differently to Excel, require a browser session, or block the request. Try another approved direct image address to isolate the issue.
IMAGE formula or a regular inserted picture?
Use IMAGE when the source is a URL and you want a formula-driven picture that can change when the address changes. It is especially convenient when image links are already stored in a data table. Use a regular inserted picture when you want the workbook to contain a fixed image rather than depend on an external address, or when the source is a file on your computer.
To insert a local copy in Excel for Windows, use Insert > Pictures and choose the option for the picture’s location, such as This Device. In some Microsoft 365 builds, Excel also offers pictures that can be placed directly in cells; menu choices can vary by update and platform. If you only have a web link and want a fixed picture, download the image only if you are allowed to do so, then insert that local file. On Mac, use the Insert tab’s picture options to select a file; the labels and available placement choices can differ from Windows. Excel for the web has its own Insert options, and some desktop picture controls may not be available there.
A static picture is less dependent on the image host after it has been inserted, but it can increase workbook size and will not automatically follow changes at the source URL. An IMAGE formula keeps the address visible and easy to update, but it depends on network access and a working source. Choose according to whether easy updating or a self-contained workbook matters more.
Keep URL-based image sheets manageable
For a small list, a URL column next to an image column is usually enough. For a larger table, use clear headers, keep each address on the same row as its related record, and give the image cells consistent row heights and column widths. This makes the sheet easier to scan and reduces confusion when people filter or sort the data.
Consider adding descriptive alt text where it helps someone understand the information conveyed by a picture. If the image is decorative or repeats a nearby text label, avoid adding a long description that merely duplicates the worksheet. For business files, document where images come from and who maintains the links. That small bit of context helps explain missing images later and makes it easier to replace a discontinued source.
Frequently Asked Questions
Can I insert an image in Excel by pasting its URL?
Yes. Put the direct image URL in a cell and use IMAGE to display it, for example =IMAGE(A2) when the address is in A2. Pasting a URL by itself normally leaves a clickable link; it does not automatically turn the link into an image.
Can IMAGE use a link to a product page?
Usually not. IMAGE needs a source that Excel can retrieve as an image, rather than a page containing an image. Find a direct image address, provided the website permits its use and does not require sign-in.
Can I make the image fill the whole cell?
Yes. With the URL in A2, use =IMAGE(A2,,1) to choose sizing mode 1. It fills the cell, but may stretch or squash the image. Mode 0 preserves the proportions and may leave empty space.
Will an IMAGE picture still work offline?
Do not rely on it to. IMAGE retrieves the source from its URL, so the image may be unavailable when the device cannot reach that source. For a workbook that must show pictures without network access, insert permitted local image files instead.
Why does IMAGE show an error even though the link opens in my browser?
The browser may be using your sign-in, cookies, or a redirect that Excel cannot use. Confirm that the URL is HTTPS, points directly to an image, and does not require authentication. If the host blocks external requests, use an approved alternative source or insert a local copy.
Related
- Excel Formatting Keyboard Shortcuts: A Practical Guide
- Excel Format Numbers in Thousands (K)
- Excel Format Cells Shortcut: Quick Keys for Windows and Mac
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Find in Excel: Search Cells, Data, and FormulasTo find text, numbers, or other content in Microsoft Excel for Microsoft 365 on Windows, press Ctrl+F, enter…
- Excel Formula Bot Free? Free Plans, Limits, and Safe UseYes—many Excel formula bots offer free access, but it is usually limited by usage, features, or account requirements.…
- VLOOKUP Errors in Excel: Causes, Checks, and FixesMost VLOOKUP errors come from a lookup value that does not match the first column of the search…
- XLOOKUP to Compare Two Sheets in Excel Step by StepIf Sheet1 has IDs in A2:A100 and Sheet2 has IDs in A2:A100, enter this in Sheet1 cell B2…
- Excel Percentage Change Formula: Examples and Common ErrorsTo calculate percentage change in Excel, subtract the old value from the new value, divide by the old…
- Capitalize Each Word in Excel with the PROPER FormulaTo capitalize the first letter of each word in Excel, enter =PROPER(A2) in an empty column beside the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.