npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@arraypress/og-image

v1.0.0

Published

Build-time Open Graph image renderer. One Satori + resvg template — eyebrow, title, subtitle, artwork tile, wordmark footer — brand-configurable, framework-agnostic.

Readme

@arraypress/og-image

Build-time Open Graph image renderer — one Satori (HTML/JSX-like tree → SVG) + @resvg/resvg-js (SVG → PNG) template that fits products, posts, news, or anything else.

Eyebrow + title + subtitle on the left, an artwork tile (or initials) on the right, a wordmark/domain footer. Brand surfaces and fonts are passed in, so it has no dependency on any site config — your route resolves those and hands them over. Pure build-time: no adapter, no runtime JS.

Install

npm install @arraypress/og-image

Usage

renderOgImage(input, options)

Render a 1200×630 card to PNG bytes.

import { renderOgImage } from '@arraypress/og-image';
import { readFile } from 'node:fs/promises';

const fonts = [
  { name: 'Inter', data: await readFile('Inter-Regular.ttf'), weight: 400, style: 'normal' },
  { name: 'Inter', data: await readFile('Inter-Bold.ttf'),    weight: 700, style: 'normal' },
];

const png = await renderOgImage(
  { title: 'Lush Pads Vol. 2', subtitle: '120 royalty-free samples', eyebrow: 'Sample pack' },
  { fonts, wordmark: 'WaveGrid', domain: 'wavegrid.app', colors: { accent: '#d1fe17' } },
);

In an Astro static endpoint (src/pages/og/[…].png.ts):

export const GET: APIRoute = async ({ props }) => {
  const png = await renderOgImage(props, { fonts, wordmark: siteConfig.name, domain });
  return new Response(png as unknown as BodyInit, { headers: { 'Content-Type': 'image/png' } });
};

input

| Field | Type | Notes | |---|---|---| | title | string | Required. Headline. Truncated at titleMaxLength. | | subtitle | string? | Sub-line. Truncated at subtitleMaxLength. | | eyebrow | string? | Small uppercase accent label above the title. | | artwork | string \| Uint8Array \| Buffer ? | Right tile: an http(s) URL, a data: URI, or raw image bytes (MIME is sniffed). Falls back to initials. |

options

| Field | Type | Default | |---|---|---| | fonts | OgFont[] | Required — Satori needs ≥1 font. Use .ttf/.otf/.woff (not woff2). | | colors | OgColors? | merged over defaults (bg, cardBg, accent, text, textSoft, muted, border) | | wordmark | string? | '' — footer text + source for default initials | | domain | string? | — footer-right text | | initials | string? | first 3 letters of wordmark | | wordmarkInitial | string? | first letter of wordmark | | titleMaxLength | number? | 80 | | subtitleMaxLength | number? | 140 | | width / height | number? | 1200 / 630 |

Notes

  • Fonts must be .ttf/.otf/.woff — Satori does not support woff2. Load them once at module scope; the renderer doesn't cache for you.
  • Artwork is inlined. Satori can't read from disk, so a path won't work — pass a URL, a data: URI, or the raw bytes (which get base64-inlined). Read the file in your route.
  • Colours are solid hex (the accent also seeds the two corner radial-gradient glows). Pass your theme tokens so the card matches your site.

License

MIT