page.setOpenGraphImageUrl(url)

Sets a page’s Open Graph image URL.

Syntax

1page.setOpenGraphImage(url: string): Promise<null>

Parameters

  • url: string - The URL of the Open Graph image to set.

Returns

Promise<null>

A Promise that resolves to null.

Example

1// Get Current Page
2const currentPage = await webflow.getCurrentPage() as Page
3
4// Set open graph image and print details
5await currentPage.setOpenGraphImage("example.com/image.jpg")
6const openGraphImage = currentPage.getOpenGraphImage()
7console.log(openGraphImage)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canManagePageSettingsAnyAnyAnyAny
Built with