Page Settings Image

How can I expose the Page Settings > Title and Image in the screen?

Hi Lynn,

thanks for the question.

Can you give us a bit more information please?

Did you mean you wanted to add the title and image on a page, via the page editor?

Via GraphQL, you can also fetch the data like so:

{
  pageBuilder {
    getPublishedPage(url: "/welcome-to-webiny") {
      data {
        title
        settings {
          social {
            image {
              src
            }
          }
          general {
            image {
              src
            }
          }
        }
      }
    }
  }
}

Does that answer your question maybe? If not, please let us know, we’d be glad to assist.

Thanks!

I’ve been putting images in Page Settings thinking that I can expose them on the page instead of embedding them via the WYSIWYG. If there isn’t an easy setting to expose these, then I’ll just plop the images on to the page.

Hi @Lynn_Hardy,

yeah, the images set via the page settings serve a different purpose.

The image field in the “General settings” tab (the one in your screenshot) represents the image that will be used for example when listing pages (using “List of pages” element). Then, we have another image field in the “Social media” tab, which will be used by various search engine / social media crawlers. This image is linked via the og:image tag in the header of each page.

So basically, you just need to use the “Image” page element in order to insert images into your pages.

Was this the thing you were looking for?

1 Like

Thanks for the clarification. I’ll be able to work with that.

1 Like