Forum Discussion

lidordayan's avatar
lidordayan
Copper Contributor
Jan 31, 2024
Solved

Image column format,

Hi all. I have a format for the Image column and it is worked great until last week.     { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmTyp...
  • ganeshsanap's avatar
    Feb 01, 2024

    lidordayan src attribute should be something like this: 

     

    "src": "=if([$Image.serverRelativeUrl],[$Image.serverRelativeUrl],@currentWeb+'/Lists/**YOUR-LIST-NAME**/Attachments/'+[$ID]+'/'+[$Image.fileName])"

     

    Where Image is the internal name of your SharePoint image column. Also, make sure to edit the above JSON and replace the **YOUR-LIST-NAME** placeholder with your list’s name, as it appears in the list URL (including special characters).


    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Resources