logo
search
Function Problems

Fix Excel IMAGE Function #CONNECT! Error with OneDrive and SharePoint

Huda QurayshiHuda Qurayshi Oct 12, 2026 870 views

Question details

The user is experiencing a #CONNECT! error when trying to use the Excel IMAGE function with image links from SharePoint, OneDrive, or Microsoft Teams.

Fix Excel IMAGE Function #CONNECT! Error with OneDrive and SharePoint Images
Product
Microsoft Excel
Device & OS
not provided
Scenario
Attempting to embed cloud-hosted images into Excel cells using the IMAGE function with standard OneDrive or SharePoint sharing links.
Observed behavior
Excel displays a #CONNECT! error instead of the image because the provided sharing link returns an HTML web page rather than a direct, authentically retrievable image file.
Before you start

Ensure you are connected to the internet and that you have the necessary viewing permissions for the image files you are trying to link from SharePoint or OneDrive.

Solution 1Recommended

Use a Direct Image URL Instead of a Sharing Link

Standard OneDrive and SharePoint sharing links direct to an HTML preview page. You must extract the direct, raw image URL for the IMAGE function to work.

The Excel IMAGE function requires a URL that points directly to an image file (e.g., ending in .jpg or .png). Default sharing links from cloud services usually load a webpage wrapper, which Excel cannot parse, resulting in a #CONNECT! error.

1
Open the sharing link in your browser

Paste your existing OneDrive or SharePoint sharing link into your web browser and press Enter to load the image preview page.

2
Copy the direct image address

Right-click directly on the image displayed in the browser and select 'Copy image address' or 'Copy image link' (wording depends on your browser).

3
Update the Excel formula

Return to Excel and replace the old sharing link in your formula with the newly copied direct link, formatted like: =IMAGE("https://your-direct-link.jpg")

Use a Direct Image URL Instead of a Sharing Link
Authentication limitations: Even with a direct link, if your organization's SharePoint requires strict login credentials that Excel cannot pass through the formula, the image may still fail to load.
Free Microsoft Office alternative

Try WPS Office for a Hassle-Free Spreadsheet Experience

Dealing with complex cloud URL authentication and function errors can disrupt your workflow. WPS Office provides a free, highly compatible, and user-friendly alternative to Microsoft Office, allowing you to seamlessly manage spreadsheets and insert images without frustrating #CONNECT! errors.

  1. 1. Download WPS Office: Visit the official WPS website to download and install the free office suite on your device.
  2. 2. Open Your Spreadsheet: Launch WPS Spreadsheets and open your existing Excel workbook without losing any formatting.
  3. 3. Insert Images Directly: Use the Insert tab to add images directly from your device, avoiding the need to troubleshoot cloud URL formulas.
Fully compatible with Microsoft Excel (.xlsx) files and formulas.Easily insert and manage local or web images without complex URL troubleshooting.Free to use with a lightweight, fast-loading application and a familiar interface.
QA img-9

Frequently Asked Questions

Why does the Excel IMAGE function show a #VALUE! error instead of #CONNECT!?

A #VALUE! error typically occurs if the URL is not a recognized string, the cell reference is empty, or the URL exceeds Excel's 255-character limit for links.

What image file formats are supported by the Excel IMAGE function?

The IMAGE function supports most standard web image formats, including BMP, JPG/JPEG, GIF, TIFF, PNG, ICO, and WEBP.

Can I use local file paths from my computer with the Excel IMAGE function?

No, the IMAGE function specifically requires a web-based URL starting with https:// or http://. To insert an image from your local hard drive, you must use the standard 'Insert > Pictures' menu.