With json in SharePoint online from link to graphic

Bildschirmfoto 2020 05 24 um 00.55.45 1
Contents

    … with this code you can display thumbnails directly in a SharePoint list. The link to a graphic file in a text field serves as the basis! For example, if you have a customer in a lookup field, you can also display the logo as a graphic.

    {
      "$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json",
      "elmType": "div",
      "children": [
        {
          "elmType": "img",
          "attributes": {
            "src": "@currentField",
            "title": "=if(@currentField == '', '', @currentField)"
          },
          "style": {
            "position": "relative",
            "top": "50%",
            "left": "50%",
            "width": "48px",
            "height": "auto",
            "margin-left": "-50%",
            "margin-top": "0%"
          }
        }
      ]
    }

    Dieser Beitrag ist auch verfügbar auf: Deutsch (German)

    Updated on 2. April 2024
    Was this article helpful?

    Leave a Reply

    Your email address will not be published. Required fields are marked *