The modifications parameter is an object that contains key-value pairs tailored for each specific templateId. The content and format of this object vary depending on the type of content generated by the chosen template. It allows you to customize various elements of the output by providing specific attributes as defined by the template.
const response = await Orshot.renderFromTemplate({
templateId: "website-screenshot",
responseType: "url",
responseFormat: "webp",
modifications: {
// [!code highlight]
testimonialText:
"Pika has converted me from any other screenshot tool I used before (happily)", // [!code highlight]
testimonialFontSize: 42, // [!code highlight]
rating: 3, // [!code highlight]
authorPhoto: "https://cdn.pika.style/headshots/caleb.png", // [!code highlight]
authorName: "Caleb Leigh", // [!code highlight]
authorDescription: "Head of Marketplace, Elgato", // [!code highlight]
authorMetaFontSize: 40, // [!code highlight]
width: 800, // [!code highlight]
},
});