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

FrankM 21 Reputation points
2021-09-03T00:50:48.183+00:00

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

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,623 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,668 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yi Lu_MSFT 17,456 Reputation points
    2021-09-03T09:58:06.38+00:00

    Hi @FrankM
    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.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful