Skip to content

Commit

Permalink
fix svgo result upload
Browse files Browse the repository at this point in the history
  • Loading branch information
fennifith committed Dec 9, 2024
1 parent 7100ec7 commit 1fd916c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worker/src/url-metadata/image-to-s3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 1fd916c

Please sign in to comment.