From 3f6d4990819b6a692eb400f3c25e32175744a63e Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Tue, 31 Mar 2026 20:46:45 +0200 Subject: [PATCH] fix: resvg cli --- lib/og.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/og.js b/lib/og.js index 9631975..8c96434 100644 --- a/lib/og.js +++ b/lib/og.js @@ -485,10 +485,10 @@ export async function generateOgImages(contentDir, cacheDir, siteName, batchSize // Render SVG to PNG using the system resvg CLI // Requires: pkg install resvg const outPath = join(ogDir, `${slug}.png`); - const resvgProc = spawnSync( - "resvg", - ["-w", String(WIDTH), "-b", COLORS.bg, "-o", outPath, "-"], - { input: svg, encoding: "buffer" } + const resvgProc = spawnSync( + "resvg", + ["-w", String(WIDTH), "-b", COLORS.bg, "-o", outPath, "-"], + { input: svg, encoding: null } ); if (resvgProc.error) { throw resvgProc.error;