Skip to main content
deleted 7 characters in body; edited tags
Source Link
Ganesh Sanap - MVP
  • 46.4k
  • 22
  • 31
  • 63

I have added JSON-code to my list column "Person" which displays the persons name and profile picture. But it doesn't show my profile picture. What do i do wrong?

{
 "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
    "elmType": "div",
    "style": {
        "flex-direction": "column",
  "align-items": "flex-start",
  "margin-top": "6px",
  "padding-right": "8px",
  "width": "100%",
  "overflow": "hidden"
    },
 "children": [{
  "forEach": "personIterator in @currentField",
  "elmType": "div",
  "attributes": {
   "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary"
  },
  "style": {
   "display": "inline-flex",
   "align-items": "center",
            "height": "28px",
            "overflow": "hidden",
   "border-radius": "12px",
   "padding-right": "8px",
   "margin": "2px"
  },
  "children": [
            {
    "elmType": "img",
    "attributes": {
     "src": "='/_layouts/15/userphoto.aspx?size=S&accountname=' + [$personIterator.email]",
     "title": "[$personIterator.title]"
    },
    "style": {
     "width": "28px",
     "height": "28px",
     "display": "block",
     "border-radius": "50%"
    }
   },
   {
                "elmType": "div",
                "txtContent": "[$personIterator.title]",
                "attributes": {
                    "title": "[$personIterator.title]",
                    "class": "nameplate-title"
                },
                "style": {
                    "padding-left": "5px",
                    "white-space": "nowrap",
                    "font-size": "12px"
                }
            }
  ],
  "defaultHoverField": "[$personIterator]"
 }]
}

Gr. P

I have added JSON-code to my list column "Person" which displays the persons name and profile picture. But it doesn't show my profile picture. What do i do wrong?

{
 "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
    "elmType": "div",
    "style": {
        "flex-direction": "column",
  "align-items": "flex-start",
  "margin-top": "6px",
  "padding-right": "8px",
  "width": "100%",
  "overflow": "hidden"
    },
 "children": [{
  "forEach": "personIterator in @currentField",
  "elmType": "div",
  "attributes": {
   "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary"
  },
  "style": {
   "display": "inline-flex",
   "align-items": "center",
            "height": "28px",
            "overflow": "hidden",
   "border-radius": "12px",
   "padding-right": "8px",
   "margin": "2px"
  },
  "children": [
            {
    "elmType": "img",
    "attributes": {
     "src": "='/_layouts/15/userphoto.aspx?size=S&accountname=' + [$personIterator.email]",
     "title": "[$personIterator.title]"
    },
    "style": {
     "width": "28px",
     "height": "28px",
     "display": "block",
     "border-radius": "50%"
    }
   },
   {
                "elmType": "div",
                "txtContent": "[$personIterator.title]",
                "attributes": {
                    "title": "[$personIterator.title]",
                    "class": "nameplate-title"
                },
                "style": {
                    "padding-left": "5px",
                    "white-space": "nowrap",
                    "font-size": "12px"
                }
            }
  ],
  "defaultHoverField": "[$personIterator]"
 }]
}

Gr. P

I have added JSON-code to my list column "Person" which displays the persons name and profile picture. But it doesn't show my profile picture. What do i do wrong?

{
 "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
    "elmType": "div",
    "style": {
        "flex-direction": "column",
  "align-items": "flex-start",
  "margin-top": "6px",
  "padding-right": "8px",
  "width": "100%",
  "overflow": "hidden"
    },
 "children": [{
  "forEach": "personIterator in @currentField",
  "elmType": "div",
  "attributes": {
   "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary"
  },
  "style": {
   "display": "inline-flex",
   "align-items": "center",
            "height": "28px",
            "overflow": "hidden",
   "border-radius": "12px",
   "padding-right": "8px",
   "margin": "2px"
  },
  "children": [
            {
    "elmType": "img",
    "attributes": {
     "src": "='/_layouts/15/userphoto.aspx?size=S&accountname=' + [$personIterator.email]",
     "title": "[$personIterator.title]"
    },
    "style": {
     "width": "28px",
     "height": "28px",
     "display": "block",
     "border-radius": "50%"
    }
   },
   {
                "elmType": "div",
                "txtContent": "[$personIterator.title]",
                "attributes": {
                    "title": "[$personIterator.title]",
                    "class": "nameplate-title"
                },
                "style": {
                    "padding-left": "5px",
                    "white-space": "nowrap",
                    "font-size": "12px"
                }
            }
  ],
  "defaultHoverField": "[$personIterator]"
 }]
}
Source Link
user2170776
  • 219
  • 1
  • 4
  • 19

JSON-code doesn't show my picture in my list

I have added JSON-code to my list column "Person" which displays the persons name and profile picture. But it doesn't show my profile picture. What do i do wrong?

{
 "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
    "elmType": "div",
    "style": {
        "flex-direction": "column",
  "align-items": "flex-start",
  "margin-top": "6px",
  "padding-right": "8px",
  "width": "100%",
  "overflow": "hidden"
    },
 "children": [{
  "forEach": "personIterator in @currentField",
  "elmType": "div",
  "attributes": {
   "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary"
  },
  "style": {
   "display": "inline-flex",
   "align-items": "center",
            "height": "28px",
            "overflow": "hidden",
   "border-radius": "12px",
   "padding-right": "8px",
   "margin": "2px"
  },
  "children": [
            {
    "elmType": "img",
    "attributes": {
     "src": "='/_layouts/15/userphoto.aspx?size=S&accountname=' + [$personIterator.email]",
     "title": "[$personIterator.title]"
    },
    "style": {
     "width": "28px",
     "height": "28px",
     "display": "block",
     "border-radius": "50%"
    }
   },
   {
                "elmType": "div",
                "txtContent": "[$personIterator.title]",
                "attributes": {
                    "title": "[$personIterator.title]",
                    "class": "nameplate-title"
                },
                "style": {
                    "padding-left": "5px",
                    "white-space": "nowrap",
                    "font-size": "12px"
                }
            }
  ],
  "defaultHoverField": "[$personIterator]"
 }]
}

Gr. P