Fix Excel IMAGE Function #CONNECT! Error with OneDrive and SharePoint
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.

- 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.
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.
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.
Paste your existing OneDrive or SharePoint sharing link into your web browser and press Enter to load the image preview page.
Right-click directly on the image displayed in the browser and select 'Copy image address' or 'Copy image link' (wording depends on your browser).
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")

Host the Image on a Publicly Reachable Server
Bypass internal authentication issues by hosting the required images on a public server or external Content Delivery Network (CDN).
Verify URL Format, Length, and File Type
Ensure your URL meets all of Excel's strict syntax and file format requirements for the IMAGE function.
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. Download WPS Office: Visit the official WPS website to download and install the free office suite on your device.
- 2. Open Your Spreadsheet: Launch WPS Spreadsheets and open your existing Excel workbook without losing any formatting.
- 3. Insert Images Directly: Use the Insert tab to add images directly from your device, avoiding the need to troubleshoot cloud URL formulas.

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.




