Skip to main content

Customization

Fine-tune your OG images with customization options.

Output Options

Control the image output format and dimensions.

{
"template": "blog",
"data": { "title": "My Post" },
"options": {
"width": 1200,
"height": 630,
"format": "webp",
"quality": 85
}
}

Available Options

OptionTypeDefaultRangeDescription
widthnumber1200200-2048Image width in pixels
heightnumber630200-2048Image height in pixels
formatstring"png"-png, jpeg, webp
qualitynumber901-100Compression quality

Format Comparison

FormatBest ForFile SizeQuality
PNGGraphics, textLargerLossless
JPEGPhotosSmallerLossy
WebPModern browsersSmallestBest ratio
Performance Tip

Use WebP format for the smallest file sizes while maintaining quality.

Different platforms have different optimal sizes:

PlatformRecommended Size
Twitter/X1200 x 630
Facebook1200 x 630
LinkedIn1200 x 627
Discord1200 x 630

Caching

Generated images are cached for performance:

  • Cache Duration: 24 hours by default
  • Cache Key: Based on template + data hash
  • Force Refresh: Add cache: false to options
{
"template": "blog",
"data": { "title": "Updated Title" },
"options": {
"cache": false
}
}

Best Practices

  1. Consistent Sizing - Use 1200x630 for broad compatibility
  2. Optimize Quality - 85-90 quality is usually sufficient
  3. Use WebP - When browser support allows
  4. Cache Wisely - Only disable cache when necessary