JSON list view - image background

%3CLINGO-SUB%20id%3D%22lingo-sub-1965988%22%20slang%3D%22en-US%22%3EJSON%20list%20view%20-%20image%20background%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1965988%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20found%20in%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Fcolumn-formatting%23style%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Edocumentation%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FA%3Ethat%20%22background-image%22%20is%20supported%20attribute%20but%20I%20am%20not%20able%20to%20use%20it.%20Maybe%20I%20am%20doing%20something%20wrong.%20Could%20you%20help%20please%2C%20how%20to%20use%20%22background-image%22%20within%20JSON%20code%3F%3C%2FP%3E%3CP%3EExample%3A%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22elmType%22%3A%20%22div%22%2C%3CBR%20%2F%3E%22style%22%3A%20%7B%3CBR%20%2F%3E%22text-align%22%3A%20%22left%22%2C%3CBR%20%2F%3E%22background-image%22%3A%20%22url('%3CA%20href%3D%22https%3A%2F%2Ftest.sharepoint.com%2Fsites%2FTEST%2FSiteAssets%2Fcompany_logo.png%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftest.sharepoint.com%2Fsites%2FTEST%2FSiteAssets%2Fcompany_logo.png%3C%2FA%3E')%22%3CBR%20%2F%3E%7D%2C%3C%2FP%3E%3CP%3EThank%20you%2C%3C%2FP%3E%3CP%3EMirek%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1965988%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EJson%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Frequent 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

0 Replies