Fix Excel Web IMAGE Function #CONNECT or #BLOCK Errors
Question details
The user is attempting to display a OneDrive image in Excel for the Web using the IMAGE function, but the cells return #CONNECT! or #BLOCK! errors.

- Product
- Excel for the Web
- Device & OS
- not provided
- Scenario
- Using the IMAGE function to embed and display pictures stored in a OneDrive account within an online Excel spreadsheet.
- Observed behavior
- Excel for the Web fails to retrieve the image and returns a #CONNECT! or #BLOCK! error instead of rendering the picture, due to security and access restrictions.
Verify that your OneDrive image URL is set to 'Anyone with the link can view' to ensure it does not require an active login session to access.
Modify OneDrive Link to a Direct Download URL
Standard OneDrive links point to a webpage viewer rather than the raw image file, which causes the IMAGE function to fail. You must extract a direct link.
Excel for the Web requires a direct, publicly accessible URL that ends in an image extension (like .jpg or .png) to render the picture. Generating a standard share link often results in a #CONNECT! error because it loads Microsoft's web interface instead of the image data.
Open OneDrive, right-click the image you want to use, select 'Share', and copy the sharing link. Ensure permissions are set to public viewing.
Instead of the standard share link, go to the image file in OneDrive, click 'Embed' from the top menu, and copy the URL specifically provided inside the HTML embed code.
Go back to Excel for the Web, select your cell, and type =IMAGE("paste_your_direct_embed_link_here"). Press Enter to see if the image renders.

Open the Spreadsheet in Excel Desktop
Bypass web browser security and privacy policies by opening the file in the fully featured local desktop application.
Try WPS Office for Seamless Spreadsheet Management
If Excel for the Web's strict security limitations are preventing you from effectively using images in your spreadsheets, consider switching to WPS Office. It provides a robust, lightweight desktop application with high compatibility and hassle-free local image insertion.
- 1. Download and install: Visit the official WPS Office website and download the free suite for your operating system.
- 2. Open your spreadsheet: Launch WPS Spreadsheets and open your existing .xlsx file directly.
- 3. Insert images effortlessly: Use the 'Insert > Picture' feature to reliably embed images without dealing with complex cloud URL restrictions.

Frequently Asked Questions
What does the #CONNECT! error mean in Excel for the Web?
A #CONNECT! error indicates that the IMAGE function cannot reach or retrieve the image from the provided URL. This usually happens if the link requires authentication, points to a web viewer page instead of a raw image file, or if there is a typo in the URL.
Does a #BLOCK! error mean my OneDrive image has been deleted?
No. A #BLOCK! error means the image exists, but Excel for the Web's security settings or privacy policies are preventing it from being downloaded and displayed in the browser. It is a security limitation, not a missing file issue.
Can I insert images directly into cells instead of using a URL formula?
Yes. Instead of relying on the IMAGE function and external OneDrive URLs, you can navigate to the Insert tab, select Pictures, and upload an image directly from your local device into the spreadsheet.




