make-og-image
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

make-og-image

NPM version NPM Downloads GitHub stars

Quick full-featured og:image PNG generation using HTML.


Status:Pre-release
Please report any issues 🐛
Made possible by my Sponsor Program 💖
Follow me @harlan_zw 🐦 • Join Discord for help

Features

  • HTML to PNG generation
  • Supports Emojis out of the box with twemoji
  • Supports custom fonts
  • Automatic image size calculation
  • <style> block support

Docs

Visit the documentation site for guides and API references.

Install

npm i make-og-image

Quick Setup

Create the head client somewhere in your root application.

import { createPng } from 'make-og-image'

const png = await createPng(`<div>
    <h1>Hello World</h1>
    <p>This is a test</p>
</div>`)

Sponsors

License

MIT License © 2023-PRESENT Harlan Wilton

Readme

Keywords

none

Package Sidebar

Install

npm i make-og-image

Weekly Downloads

2

Version

0.1.2

License

MIT

Unpacked Size

19.4 kB

Total Files

7

Last publish

Collaborators

  • harlan_zw