Forum Discussion
wlauritson
Jun 25, 2024Copper Contributor
Custom Thumbnail Images on Tile/Gallery View - Sharepoint Online
Hey all, I have a Sharepoint list/library of images in various file types (png, jpeg, tif, etc.). Most of these images have a thumbnail autogenerated by Sharepoint which is great. There are some ...
TimLB
Jun 25, 2024Steel Contributor
Try reversing the logic you would normally use for custom JSON formatting. Assuming the custom thumbnail field is a string/URL use the index of function to test the length of the value in that field.
(have a look at this article for guidance)
https://knowledge-junction.in/2021/08/24/sharepoint-list-view-formatting-how-to-find-length-of-string/
If the length indicates that the field is not filled out, then assume the regular thumbnail is there and display. Otherwise show the custom thumbnail field as the image.
(have a look at this article for guidance)
https://knowledge-junction.in/2021/08/24/sharepoint-list-view-formatting-how-to-find-length-of-string/
If the length indicates that the field is not filled out, then assume the regular thumbnail is there and display. Otherwise show the custom thumbnail field as the image.