Skip to content

Fix: Use html-to-image to fix broken selfie downloads#390

Open
theprtsh wants to merge 1 commit into
vizchitra:masterfrom
theprtsh:fix-selfie-download
Open

Fix: Use html-to-image to fix broken selfie downloads#390
theprtsh wants to merge 1 commit into
vizchitra:masterfrom
theprtsh:fix-selfie-download

Conversation

@theprtsh

Copy link
Copy Markdown

Resolves #389

The native SVG-to-canvas approach in screenshot.ts was failing on Chromium and Gecko browsers. Users could not download the images they made in the selfie tool.

Replaced the <foreignObject> with html-to-image. It handles the rendering edge cases properly and restores the download functionality.

What I did:

  • Added html-to-image via pnpm.
  • Rewrote captureNodeAsPNG in screenshot.ts to use the new library.
  • Ran pnpm format and pnpm lint to match code style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: selfie tool image download fails

1 participant