Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toBlob won't save to a jpeg #458

Open
funkyvisions opened this issue Mar 26, 2024 · 1 comment
Open

toBlob won't save to a jpeg #458

funkyvisions opened this issue Mar 26, 2024 · 1 comment
Labels

Comments

@funkyvisions
Copy link

Expected Behavior

toBlob(node, { type: "image/jpeg" }) should get a blob with a jpeg embedded

Current Behavior

toBlob(node, { type: "image/jpeg" }) is always embedding a png

Possible Solution

toBlob is calling canvasToBlob WITHOUT the options

Steps To Reproduce

const blob = await htmlToImage.toBlob(elem, { type: "image/jpeg" })

Blob has type "image/png"

Additional Context

Your Environment

  • html-to-image: 1.11.11
  • OS: macOS Sonoma 14.4
  • Browser: Chrome
@vivcat
Copy link
Contributor

vivcat bot commented Mar 26, 2024

👋 @funkyvisions

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant