1

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?

enter image description here

0

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();

More Reference:

BR

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.