Use this JSON:
{
"elmType": "div",
"attributes": {
"class": "ms-borderColor-neutralTertiary"
},
"style": {
"width": "99%",
"border-top-width": "0px",
"border-bottom-width": "1px",
"border-left-width": "0px",
"border-right-width": "0px",
"border-style": "solid",
"margin-bottom": "16px"
},
"children": [
{
"elmType": "div",
"style": {
"display": "flex",
"box-sizing": "border-box",
"align-items": "center"
},
"children": [
{
"elmType": "img",
"attributes": {
"src": "=getUserImage([$PersonColumn.email], 's')",
"class": "ms-fontSize-42 ms-fontWeight-regular ms-fontColor-themePrimary"
},
"style": {
"flex": "none",
"padding": "0px",
"padding-left": "0px",
"height": "36px"
}
}
]
},
{
"elmType": "div",
"attributes": {
"class": "ms-fontColor-neutralSecondary ms-fontWeight-bold ms-fontSize-24"
},
"style": {
"box-sizing": "border-box",
"width": "100%",
"text-align": "left",
"padding": "21px 12px",
"overflow": "hidden"
},
"children": [
{
"elmType": "div",
"txtContent": "='Contact details for ' + [$Title]"
}
]
}
]
}
Where PersonColumn
is the name of your person or group column. You can get the internal name of your column by following this article: How to find the Internal name of columns in SharePoint Online?
Output:
img
element instead of div element with iconName. I will provide the full JSON once I open my laptop.