Something went wrong. Try again.
mat's hack club statistical analysis statsclub.matmanna.dev
nuxt vue dashboard hackclub
Something went wrong. Try again.
123456789101112131415161718import fs from "node:fs";import { Resvg } from "@resvg/resvg-js";
const inputPath = new URL("../public/og-image.svg", import.meta.url);const outputPath = new URL("../public/og-image.png", import.meta.url);
const svg = fs.readFileSync(inputPath, "utf8");const resvg = new Resvg(svg, { fitTo: { mode: "width", value: 1200 }});
const png = resvg.render().asPng();fs.writeFileSync(outputPath, png);
console.log(`Wrote ${outputPath.pathname}`);