Expected Behavior
toJpeg method generates compressed jpeg image as expected without any performance issue.
Current Behavior
Google Chrome gets stuck and generating jpeg file takes too long (causing the page to crash).
Possible Solution
Can't provide a suggested solution.
Steps To Reproduce
- Try to generate a jpeg file for a big DOM element using toJpeg method.
Additional Context
We have seen people reporting similar issue using html2canvas library (specifically html2canvas method), not sure if this library is using it behind the scene.
Your Environment
- html-to-image: 1.11.11
- OS: macOS Sequoia 15.5
- Browser: Google Chrome Version 138.0.7204.93 (Official Build) (arm64)