| Type | Supported Formats | Supported Types | |
|---|---|---|---|
| Library Template | png jpg jpeg webp pdf | base64 url binary |
Automate this template using integrations
You can generate Link Preview Image renders using Rest API and Orshot SDKs
await fetch("https://api.orshot.com/v1/generate/images", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <ORSHOT_API_KEY>",
},
body: JSON.stringify({
"templateId": "link-preview-image",
"response": {
"format": "png",
"type": "base64"
"scale": 1
},
"modifications": {
"url": "https://www.theverge.com/the-vergecast/673453/openai-jony-ive-io-gadget-google-io-vergecast",
"backgroundPattern": "waves",
"backgroundColor": "linear-gradient(#80E4AB, #348F6A)",
"backgroundImage": "",
"fontFamily": "Poppins",
"width": "1200",
"title": "",
"author": "",
"authorTitle": "",
"date": "",
"readTime": "",
"authorPhoto": ""
}
}),
});You can customize the template using following modifications
| Key | Description | Type |
|---|---|---|
| url | URL of the blog post to extract metadata from | string |
| backgroundPattern | Add a background pattern, leave empty for none. | select |
| backgroundColor | Background color or gradient. Supports hex colors, CSS gradients, or named colors | string |
| backgroundImage | Background image URL. Takes priority over backgroundColor | string |
| fontFamily | Font family for the text | select |
| width | Width of the preview card in pixels (height is auto) | number |
| title | Override the automatically extracted title | string |
| author | Override the automatically extracted author name | string |
| authorTitle | Author's job title or description | string |
| date | Override the automatically extracted publish date | string |
| readTime | Estimated reading time | string |
| authorPhoto | Override the automatically extracted author photo URL | string |