bubkoo / html-to-image

✂️ Generates an image from a DOM node using HTML5 canvas and SVG.
MIT License
5.39k stars 503 forks source link

Much larger file on Safari(Mac) or iOS compared to Chrome(Mac) #459

Open leitejppb opened 3 months ago

leitejppb commented 3 months ago

Current Behavior

I'm currently having an issue when generating an image with html-to-image on iOS as it takes quite a long time compared to Android. I was able to reproduce it using Safari on Mac versus using Chrome I've noticed that regardless of the quality settings or formats or any other property that I pass on the options object, the image file size generated initially on Safari is much larger than in Chrome. On a small image, on Safari the file size can be around 8/9 MBs while on Chrome it can be around 200/300 KBs This is also impacting the time to get the final screenshot as the request is much larger.

Did anyone run into the same issue?

Steps To Reproduce

  1. Use html-to-image on Safari
  2. Check Network tab to see the requests when the screenshot is taken
  3. Compare with Chrome

Your Environment

vivcat[bot] commented 3 months ago

👋 @leitejppb

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.