SharePoint Online: External Image URLs not working in JSON Formatting
SharePoint Online is a powerful collaboration and content management platform that empowers organizations to create, manage, and share information seamlessly. JSON formatting in SharePoint online allows users to customize the look and feel of the columns, views and forms in their SharePoint lists and libraries.
Earlier this year Microsoft updated the SharePoint JSON formatting feature and blocked most of the external domain image sources by default in custom JSON column and view formatting.
Only images from the following domains are allowed by default:
- tenant domain, configured multi-geo domains and vanity domains (
company.sharepoint.com) cdn.office.net,akamaihd.net,static2.sharepointonline.comCDNs
The Solution – Modifying HTML Field Security Settings:
To address the challenge of displaying external web site domain images in JSON formatting, one effective solution is to adjust the HTML field security settings of your SharePoint site. This involves whitelisting trusted external domains or CDNs to allow their images to be displayed within your SharePoint environment. Follow these steps to implement the solution:
1. Go to your SharePoint online site.
2. Click on Settings (gear) icon from top right corner and select Site information.
3. Click on View all site settings link from Site information panel, it will open the SharePoint site settings page.
4. Under the Site Collection Administration section, locate and click on the HTML Field Security settings link.
5. Select Allow contributors to insert iframes only from the following domains, add external web site domain from where you are using the images under Allow iframes from this domain text box and click Add button.
6. Click OK button at the bottom of HTML Field Security settings page to save the changes.

7. Navigate back to the SharePoint list where you are using external image with JSON formatting and refresh the web page. Now, you should see that the external images are working using the SharePoint Online JSON formatting.
Output
Before adding external site domain to SharePoint HTML Field Security Settings:

After adding external site domain to SharePoint HTML Field Security Settings:

Learn more
- Download Image from SharePoint Image column using JSON formatting
- SharePoint JSON formatting: Check if date & time column is blank/empty
- SharePoint: Highlight selected list item rows using JSON formatting
- SharePoint Online: Download files using JSON Formatting
- How to find the Internal name of columns in SharePoint Online?
- SharePoint Online: Apply JSON View formatting using PnP PowerShell