-
-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Description
Case description
Version 5.0.0 always return a Buffer object, compared to version 4.0.0 which returned a string if encoding option is set to 'base64'. This was introduced Sep 3, 2024 on commit :arrow-up: upgrade puppeteer to 23.2.2.
Was this transition expected by the v5.0.0 update?
Suggestion
Make node-html-to-image return a base64 string similar to v4.0.0.
Note: breaking change considering the returned data type changes from Buffer to string. Even if I did expect v5.0.0 to return a string to begin with after transitioning from v4.0.0 to v5.0.0.
node-html-to-image/src/screenshot.ts
Lines 43 to 51 in d51edae
| const result = await element.screenshot({ | |
| path: screenshot.output, | |
| type: screenshot.type, | |
| omitBackground: screenshot.transparent, | |
| encoding: screenshot.encoding, | |
| quality: screenshot.quality, | |
| }); | |
| screenshot.setBuffer(Buffer.from(result)); |
Metadata
Metadata
Assignees
Labels
No labels