aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/image/index.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/modules/image/index.ts b/src/modules/image/index.ts
index babfa2dc..76aa759e 100644
--- a/src/modules/image/index.ts
+++ b/src/modules/image/index.ts
@@ -1,3 +1,4 @@
+import { toBase64 } from '../../internal/base64';
import { deprecated } from '../../internal/deprecated';
import { ModuleBase } from '../../internal/module-base';
@@ -388,8 +389,6 @@ export class ImageModule extends ModuleBase {
return type === 'svg-uri'
? `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(svgString)}`
- : `data:image/svg+xml;base64,${Buffer.from(svgString).toString(
- 'base64'
- )}`;
+ : `data:image/svg+xml;base64,${toBase64(svgString)}`;
}
}