Forum Discussion

Shweta_k855's avatar
Shweta_k855
Icon for Microsoft rankMicrosoft
Jul 28, 2023

Having problems with image type column in sharepoint

The SharePoint list doesn't store images (in image type column) in sites assets folder and uploads them with this prefix Reserved_ImageAttachment_[]_fileName. 

 

Does anyone know why is this happening? Is there some setting that not correct?

 

As seen in the image, when I upload an image to image type column, the attachment column shows the page clip logo. And when no image is uploaded, the attachment field is blank. 

 

My images column type is Image/Thumbnail

 

17 Replies

  • Mikel2024's avatar
    Mikel2024
    Copper Contributor

    Shweta_k855 

     

    I found a very weird solution which is showing the problem:
     
    (1) I disabled ATTACHMENTS in the list
    (2) I Uploaded an image
    (3) I need to refresh my list to see the following:
     

     

     
    (4) Now I need to go to the Column-Format settings and to delete the json entry.
    (5) If I then use the review button I can see the image
    (6) If I save it, the image stays, if I cancel I can not see the image. 
    (7) I need to repeat that procedure for each image as the column formating is default set to:
     
    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json"
    }
     
    Kind regards
    Michael 
    • JHON485's avatar
      JHON485
      Copper Contributor

      Mikel2024 

       

      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

      • Mikel2024's avatar
        Mikel2024
        Copper Contributor

        JHON485

         

        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:

         

        {
        "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json"
        }
         
        Which is the default is NOW working, not sure how long ๐Ÿ™„ ๐Ÿ˜
        I would say, try again the default... and good luck 
         
        Cheers
        Michael

         

  • HOSolve's avatar
    HOSolve
    Copper Contributor
    Does anyone have an update on this that does not involve creating something new in Power Automate or using Power Shell?
  • Shweta_k855 

    I was facing the same issue for images are made from the camera on a mobile device and saved via PowerApps (as jpg). This problem does not occur when using PowerApps with a computer browser (as saved as png). 

     

    As a consequence, the picture could not be displayed in PowerApps in the browser (probably as it is not transferred to the Asset Folder but kept in the Attachment). However the image shows well on PowerApps on mobile and in the image column of SharePoint. 

     

    I resolved the issue in PowerApps by setting the image card this way:

    If(ThisItem.'Has attachments'=true,First(ThisItem.Attachments).Value,ThisItem.Picture.Small)

  • ryandempsey's avatar
    ryandempsey
    Copper Contributor
    Did you find any other information on this? I noticed the same thing on our tenant just today. Previously updated images are fine, but the last three added have that same prefix added.
    • ganeshsanap's avatar
      ganeshsanap
      MVP

      ryandempsey Shweta_k855 Smile2024 

       

      As per the article SharePoint Online: All you need to know about New Image column type, images added to SharePoint list image columns should be stored in a sub folder inside Site Assets library which has format in general like Site Assets โ€“> Lists โ€“> <GUID of list> and file name should be same as file name you have on your computer while adding the image.

       

      Microsoft is currently rolling out multiple new features for SharePoint Lists / Microsoft Lists. I think those releases must have affected the image column functionality.

       

      I will suggest you to raise a support ticket with Microsoft directly and report this behavior. Follow: Get M365 Support - Online Support 


      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.

      • Smile2024's avatar
        Smile2024
        Copper Contributor
        Thank you. I contacted support and took this solution at short notice:
        https://ganeshsanapblogs.wordpress.com/2022/10/13/add-update-image-columns-in-sharepoint-microsoft-lists-using-pnp-powershell/

        thanks again.

    • Smile2024's avatar
      Smile2024
      Copper Contributor
      Hello we have the same problem, I canโ€™t see any logic in the error. I have now opened a support case on Microsoft. Do you have any solutions? Thanks
      • vladschiop1890's avatar
        vladschiop1890
        Copper Contributor
        Hello,

        Could you point us to the Microsoft support link?
        Did you get any response from them?
  • Eilaf-Barmare's avatar
    Eilaf-Barmare
    Brass Contributor

    Hi Shweta,

    Just checked on my lab environment, this does not happen on my tenant.

    Could you please check if this issue is specific to the list in question? If so, how is the list created? Check the behavior on a different site.

    It'll help you scope the issue. If the issue is with all the sites (check behavior on existing vs new lists). If you feel this is a bug, check with MSFT support. I don't believe this is an expected behavior, but a bug.

Resources