Forum Discussion
Having problems with image type column in sharepoint
Your solution is good but it's like I have a bad hand and I cut it off but I I will never have 2. (images as left hand and annexes as right hand).
I opened ticket and or Microsoft will fix or let SharePoint die
Hello JHON485
Thats true so I tried the following and it was working:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"display": "=if(@currentField,'block','none')",
"overflow": "hidden",
"margin": "8px auto -3px -4px",
"cursor": "pointer"
},
"children": [
{
"elmType": "img",
"attributes": {
"src": "=getThumbnailImage(@currentField, 100, 100)"
},
"style": {
"position": "relative",
"top": "50%",
"left": "10%",
"margin-top": "10px",
"width": "100px"
}
}
]
}
But now the weird stuff 😉 The following will work for me which is default for me: