JSON list view - image background

Iron Contributor

Hi,

I found in documentation that "background-image" is supported attribute but I am not able to use it. Maybe I am doing something wrong. Could you help please, how to use "background-image" within JSON code?

Example:
{
"elmType": "div",
"style": {
"text-align": "left",
"background-image": "url('https://test.sharepoint.com/sites/TEST/SiteAssets/company_logo.png')"
},

Thank you,

Mirek

2 Replies

@Miroslav Novák, I'm running into the same issue. If I find something I'll repost link here.

@Miroslav Novák @mLantz 

 

This is by design and expected behavior while using SharePoint JSON formatting. Currently style properties cannot have any of the following characters: ( : & ; !

 

You can find more details about this issue in JSON formatting at: JSON SharePoint list view - background-image does not work 


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.