Skip to content

Commit 2afcd69

Browse files
committed
fix: rimuovi spazi vuoti nel template SVG per la generazione delle immagini OG
1 parent 7a7b40a commit 2afcd69

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib/og-image-generator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export async function generateOGImage(
9696
const titleY = opts.height / 2 - 30;
9797
const subtitleY = opts.height / 2 + 40;
9898
const brandText = "Un'idea di onData";
99-
99+
100100
const svgTemplate = `
101101
<svg width="${opts.width}" height="${opts.height}" xmlns="http://www.w3.org/2000/svg">
102102
<defs>
@@ -117,7 +117,7 @@ export async function generateOGImage(
117117
<circle cx="${opts.width - 100}" cy="100" r="50" fill="rgba(255,255,255,0.1)" />
118118
</svg>
119119
`;
120-
120+
121121
try {
122122
const pngBuffer = await sharp(Buffer.from(svgTemplate))
123123
.png({ quality: 90, compressionLevel: 6 })

0 commit comments

Comments
 (0)