For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Designer API
    • Introduction
    • Getting Started
    • Webflow CLI
    • Error Handling
    • App Modes
  • Elements
    • Creating & Retrieving Elements
    • Element Properties & Methods
    • Element Types & Methods
  • Styles
    • Managing Style Properties
    • Managing Variable Modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
  • Assets
  • Pages & Folders
      • Page information
      • Page settings
        • Get Open Graph title
        • Set Open Graph title
        • Check if page uses title as the Open Graph title
        • Use page title as Open Graph title
        • Get Open Graph description
        • Set Open Graph description
        • Check if page uses description as the Open Graph description
        • Use page description as Open Graph description
        • Get Open Graph image
        • Set Open Graph image URL
  • Utilities
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • page.getOpenGraphImage()
  • Syntax
  • Returns
  • Example
  • Designer Ability
Pages & FoldersManaging PagesOpen Graph metadata

Get Open Graph image

Was this page helpful?
Previous

Set Open Graph image URL

Next
Built with

page.getOpenGraphImage()

Retrieves the URL for the Open Graph image of the page.

This method always returns the image for the primary locale.

Syntax

1page.getOpenGraphImage(): Promise<string>

Returns

Promise<string>

A Promise that resolves to a string containing the URL for the Open Graph image of the page or null if there is no image set for the page.

Example

1// Get Current page
2const currentPage = await webflow.getCurrentPage() as Page
3
4// Get Open Graph image and print its URL
5const openGraphImage = await currentPage.getOpenGraphImage()
6if (openGraphImage) {
7 console.log(openGraphImage)
8} else {
9 console.log('No Open Graph image is set for this page')
10}

Try this example

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canReadPageSettingsAnyAnyAnyAny