From 11b680e84f0f8a80b6996d3017b8558e7cae3823 Mon Sep 17 00:00:00 2001 From: Zach Leatherman Date: Wed, 17 Jul 2024 18:16:02 -0500 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20convert=20to=20string=20when=20?= =?UTF-8?q?we=20want=20the=20raw=20SVG=20buffer.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/format-hooks/svg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/format-hooks/svg.js b/src/format-hooks/svg.js index cf72ba4..0d87c8f 100644 --- a/src/format-hooks/svg.js +++ b/src/format-hooks/svg.js @@ -4,7 +4,7 @@ module.exports = async function createSvg(sharpInstance) { let input = sharpInstance.options.input; let svgBuffer = input.buffer; if(svgBuffer) { // remote URL already has buffer - return svgBuffer.toString("utf-8"); + return svgBuffer; } else { // local file system return fsp.readFile(input.file); }