I'm trying to set thumbnail image and page description programmatically using pnpjs. By default it is picking banner image as thumbnail image and first paragraph in page as page description. How can i update those fields?
You can have a try below method to update thumbnail image and page description programmatically:
const page = await sp.web.loadClientsidePage("/sites/s01/SitePages/getcontrol.aspx"); page.description = "iam new desc"; page.bannerImageUrl = "https://abc.sharepoint.com/sites/s01/testlib/Pictures/1.jpg"; page.save();