Forum Discussion
"Dynamically display images from a document library" is missing in Image Gallery web part
MoTheSeeker has anyone found a resolution or reason for this? I have the same issue and would love to actually be able to do some work today.
DaveGrooms MadhusudanShettyMS Yes! I have a workaround. I added a column type "Hyperlink or Picture" in the document library as follows;
I Format URL as a "picture" in the column setting, added the following JSON in the Column Formatting:
-----------------------------------------
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "img",
"attributes": {
"src": "@thumbnail.medium"
},
"style": {
"display": "block",
"margin": "0 auto",
"max-height": "142px"
}
}
-----------------------------------------
Column setting screenshot as follows;
And when I add the Image gallery web part to the modern page it displays the images.
I hope it helps 🙂 best regards, ~Mo
- yrrgeirsMar 17, 2021Copper Contributor
MoTheSeeker haha, this sounds just enough Microsoft crazy for me to actually try it!
- MoTheSeekerMar 17, 2021Brass Contributor🙂