Aug 30 2022 12:13 PM
I'm using the organizational assets option to provide users a central repo of approved images to use on their sites. For pages we offer a banner image and optimized thumbnail and on smaller screens, each banner and thumb occupy one row in the image picker panel making it easier to select the right file. On larger screens, the panel is wider and the images get mixed up as you can see:
Smaller screen:
Larger screen:
The panel displays whatever the default view of the library is so I've tried various different JSON view formatting methods to restrict the size of the images. The view is in Gallery mode so should I use the tile formatter, or a plain list formatter? Neither has worked so far.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json",
"tileProps": {
"hideSelection": false,
"hideListHeader": true,
"width": "1204",
"height": "",
"formatter": {
"elmType": "div",
"attributes": {
"class": "ms-borderColor-neutralLight"
},
"style": {
"flex-direction": "column",
"align-items": "stretch",
"box-sizing": "border-box",
"border-width": "0px",
"border-left-width": "0px",
"border-style": "solid",
"max-width": "120px",
"height":""
},
"children": [
{
"elmType": "div",
"style": {
},
"attributes": {
"class": "ms-NewsPinningItemImage"
},
"children": [
{
"elmType": "img",
"attributes": {
"src": "[$ImagePath]"
},
"style": {
"border": "1px solid #808080"
}
}
]
}
]
}
}
}
Aug 30 2022 09:20 PM
@mattchowell You need to apply the JSON in All Documents > Tiles view.
I have formatted the image tile using SharePoint default "Design mode" and saved view. Here's how it works in "Your Organization" pane while editing the page:
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.
Sep 07 2022 12:09 PM
Sep 08 2022 01:43 AM
@mattchowell Here are the steps I followed:
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.
Sep 08 2022 09:22 AM