Skip to content

toBlob won't save to a jpeg #458

@funkyvisions

Description

@funkyvisions

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions