Forum Discussion

Mirek_N's avatar
Mirek_N
Iron Contributor
Dec 08, 2020

JSON list view - image background

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

  • Mirek_N 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.

  • mLantz's avatar
    mLantz
    Copper Contributor

    Mirek_N, I'm running into the same issue. If I find something I'll repost link here.

Resources