From 1fd916cab0b57f9cfbf82b00b23252797e393683 Mon Sep 17 00:00:00 2001 From: James Fenn Date: Sun, 8 Dec 2024 20:14:12 -0500 Subject: [PATCH] fix svgo result upload --- worker/src/url-metadata/image-to-s3.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/src/url-metadata/image-to-s3.ts b/worker/src/url-metadata/image-to-s3.ts index 5600404..6a27847 100644 --- a/worker/src/url-metadata/image-to-s3.ts +++ b/worker/src/url-metadata/image-to-s3.ts @@ -22,7 +22,7 @@ export async function imageToS3( if (path.extname(url.pathname) === ".svg") { // If the image is an svg, optimize with svgo const svg = await request.text(); - const optimizedSvg = svgo.optimize(svg, { multipass: true }); + const optimizedSvg = svgo.optimize(svg, { multipass: true }).data; const uploadKey = `${key}-${urlHash}.svg`; if (await exists(bucket, uploadKey)) {