Forum Discussion
Hyperlink/Picture Column suddenly breaks external images in Gallery/Card Designer
We use a Flow with an API connection to grab image links from an external vendor and populate that data to the Hyperlink or Picture column of a SharePoint list. We then add JSON formatting to display the image links in a Gallery view. The Hyperlink or Picture Column is set to display as Picture.
The external images still display fine in the list item view, just not the Gallery/Card view. This was working fine for several months, but something seems to have changed over the last weekend, causing externally linked images in Picture/Hyperlink Columns to break.
I setup a simple test list to display this behavior using a public domain image.
External Image link:
https://www.publicdomainpictures.net/pictures/20000/velka/computer-memory-chips.jpg
Internal Image link:
https://[mydomain].sharepoint.com/sites/WebDev/SiteAssets/Lists/[LIST-ID/computer-memory-chips.jpg
Here is an All Items List View sample:
Here is a Gallery/Card Designer View sample of the same list:
No JSON used in these examples, just the default Gallery / Card Designer:
I've experimented with the Image column, which doesn't seem to exhibit this issue, but unfortunately that column is not available in the Create Items step of the Flow so I assume it cannot be dynamically populated.
Andrew Stitt Microsoft updated something in backend which affects external images referred in SharePoint JSON formatting.
When you refer external images in JSON formatting, src in img element is changed to data-untrusted-src automatically, like:
You can fix this issue by adding external site domain from which you are using images in HTML Field Security settings, detailed steps given at: SharePoint Online: External Image URLs not working in JSON Formatting
I just tested this and it worked for me:
Also, it is possible to add/update SharePoint image columns using Power automate:
- Add an image to SharePoint Image columns using Power Automate
- Update image in SharePoint/Microsoft Lists Image columns using Power Automate
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Andrew Stitt Microsoft updated something in backend which affects external images referred in SharePoint JSON formatting.
When you refer external images in JSON formatting, src in img element is changed to data-untrusted-src automatically, like:
You can fix this issue by adding external site domain from which you are using images in HTML Field Security settings, detailed steps given at: SharePoint Online: External Image URLs not working in JSON Formatting
I just tested this and it worked for me:
Also, it is possible to add/update SharePoint image columns using Power automate:
- Add an image to SharePoint Image columns using Power Automate
- Update image in SharePoint/Microsoft Lists Image columns using Power Automate
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- Andrew StittCopper Contributorganeshsanap The backend change was indeed the cause. I added our vendor's domain to the list of "Allow iframes from this domain" in the HTML Field Security settings and that resolved the issue.
Thanks for your assistance and the tip on updating the Image column with Power Automate!