fix(nextjs): parses width height to int for sharp svg to png
This commit is contained in:
parent
df90b7829c
commit
e07a04ba6a
1 changed files with 1 additions and 1 deletions
|
|
@ -179,7 +179,7 @@ const convertSvgToPng = async (element_attibutes: ElementAttributes) => {
|
|||
|
||||
const svgBuffer = Buffer.from(svgHtml);
|
||||
const pngBuffer = await sharp(svgBuffer)
|
||||
.resize(element_attibutes.position?.width ?? 10, element_attibutes.position?.height ?? 10)
|
||||
.resize(Math.round(element_attibutes.position?.width ?? 10), Math.round(element_attibutes.position?.height ?? 10))
|
||||
.toFormat('png')
|
||||
.toBuffer();
|
||||
return pngBuffer;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue