question

FrankM-3657 avatar image
0 Votes"
FrankM-3657 asked YiLu-MSFT commented

Sharepoint: Banner Image URL takes me to This site can't be reached

Hi,

In the default site pages library I have site pages with a banner image uploaded, tried everything, from the site or locally, and as you can see from the image below, the image is just a broken link that when clicked it gives me the err_invalid_response.

For the default Home.aspx , the banner image is in /sites/layout.../sitepagesthumbanil.png
While any page I create and then upload a banner, the image is in /sites/getpreview.ashx?path...
It's like it doesn't find the image?

Ultimately, what I need this image preview is because I'm using powerapps to display the articles in a gallery, and for the image whenever I use ThisItem.BannerImageUrl or ThisItem.Thumbnail.Large , a white images gets displayed, so I'm open to other ways to display the image of site page.

Any tips?

128809-s.png


office-sharepoint-onlinesharepoint-dev
s.png (43.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

YiLu-MSFT avatar image
1 Vote"
YiLu-MSFT answered YiLu-MSFT commented

Hi @FrankM-3657
Per my test, banner image URL of modern page is generated automatically after we upload a banner image.

129060-image.png


If you want to display the url into image, we could use the following column formatting with Advanced mode:

129040-image.png

{
"$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json",
"elmType": "div",
"children": [
{
"elmType": "img",
"attributes": {
"src": "@currentField",
"title": "@currentField"
},
"style": {
"position": "relative",
"top": "50%",
"left": "50%",
"width": "48px",
"height": "auto",
"margin-left": "-50%",
"margin-top": "0%"
}
}
]
}


As a result: the url turn into image.

129068-image.png



If an Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (177.6 KiB)
image.png (9.3 KiB)
image.png (117.5 KiB)
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @YiLu-MSFT ,
Thanks for your response however when I apply the format, what I see is this:
129388-image.png




I believe there's a problem accessing or displaying the image, like it's not there or it can't be reached? I actually don't know, most examples online when they use "ThisItem.Thumbnail.Large" works.

Any thoughts?

0 Votes 0 ·
image.png (26.4 KiB)

Hi @FrankM-3657
You could change a banner image to test whether it will work, I suggest to choose the image from sharepoint stock images.

129573-image.png


The Banner Image URL will be:

129574-image.png


After formatting the column, it will be:

129555-image.png


0 Votes 0 ·
image.png (472.3 KiB)
image.png (68.9 KiB)
image.png (19.9 KiB)

Hi @FrankM-3657
Would you please provide some update of this issue? Is my advice helpful for you?

0 Votes 0 ·

Hi @YiLu-MSFT ,
I just provided an uploaded image to "preview" the pages, they seemed happy enough with it. When I have time, I'll have more of a play with preview images.
Thanks,
Frank

0 Votes 0 ·
Show more comments