fix: resvg og image generation
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m44s

This commit is contained in:
svemagie
2026-03-31 21:25:38 +02:00
parent dbcbdf4c57
commit e80b99ce49

View File

@@ -486,7 +486,7 @@ export async function generateOgImages(contentDir, cacheDir, siteName, batchSize
// Requires: pkg install resvg
const outPath = join(ogDir, `${slug}.png`);
console.log(`[og] Generating: ${outPath}`);
const result = spawnSync("resvg", ["-w", String(WIDTH), "-b", COLORS.bg, "-o", outPath, "-"], { input: svg, encoding: null });
const result = spawnSync("resvg", ["-w", String(WIDTH), "--background", COLORS.bg, "-", outPath], { input: svg, encoding: null, timeout: 30000 });
if (result.error) {
console.error(`[og] resvg CLI error for ${outPath}:`, result.error);
throw result.error;