Customizable social media preview image, like this one:
yarn add @egoist/preview-card
NOTE: this module relies on Chrome (or Chromium) browser, make sure you have it installed on your machine before running this module.
import { getImage, stopBrowser } from '@egoist/preview-card'
const imageBuffer = await getImage({
title: 'your title',
description: 'your description',
domain: 'your domain',
themeColor: '#e02423', // optional
})
// Close the browser when you no longer need to use this module
await stopBrowser()
preview-card out.png --title title --domain domain --desc description
# All flags
preview-card --help
Thanks to Mugshot Bot for the original design inspiration.
MIT © EGOIST