Forum Discussion

AndyTuke1325's avatar
AndyTuke1325
Copper Contributor
Jan 31, 2024

List gallery view doesn't show images, while standard list view does

I have built a Flow for a customer, to allow users to submit a MS form with details of unwanted office equipment including a photo, which goes through an approval and then saves the item in a 'Stock Exchange' SharePoint list. 

The flow works by using Create File to save the image into the Sites Assets/Lists/<ListGUID> document library, and then using Send an HTTP Request to SharePoint to create the list item referring to the image. I have a gallery view on the list which works fine if I manually add an item and include an image, if its saved by the flow it fails to display properly, it just gives the files name. The image is definitely present in the library with that name. If I change to normal list view it displays correctly. There just seems to be something missing for the gallery view, such as a generated thumbnail file for example, any suggestions?

See images below

2 Replies

  • AndyTuke1325's avatar
    AndyTuke1325
    Copper Contributor

    Update:
    I've just been exploring the Site Assets/Lists document library with PnP PowerShell and comparing a working image and a non working image.
    Get-PnPListItem -List "Site Assets" -Id <item ID> | Select-Object -ExpandProperty FieldValues.

    The only difference I can see is these 2 properties:
    ImageMetadataListItemId 1
    ImageMetadataListFieldId 63856ec5-d837-4d96-818d-9b595a0ea5a2

    They are populated like shown for the working one, but blank for the other. Might be nothing but cant see any other difference.
    I also tried the column formating from this article
    https://lists.handsontek.net/format-image-column-preview-microsoft-lists-sharepoint/
    The image immediately didnt display again. I can see the line
    "src": "=getThumbnailImage(@currentField, 500, 500)"
    Makes me think that there's a thumbnail image somewhere that's required, which the Flow isn't creating

Resources