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

When I call toPng for a second time on a different ref, the image is still old #444

Closed Qualia-Li closed 6 months ago

Qualia-Li commented 6 months ago

Expected Behavior

When people try to download different post (an HTML ref), they should see different images downloaded

image image

Current Behavior

When people try to download different post (an HTML ref), though different images are rendered on browser properly, they should see the same image downloaded (always the image from the first post they try to download)

This is what they see when downloaded night elf (1) night elf (2) night elf (3)

Possible Solution

I dont know, is this cashing issue?

Steps To Reproduce

  1. ...
  2. ...
  3. ...
Error Message & Stack Trace

```txt ```

Additional Context

Users of my product cannot use it properly

Let users download different elements on the webpage

You can try by going to drlambda.ai, and sign up (for free), create a social post, and then download the different pages of it.

Your Environment

node -v v18.12.1

vivcat[bot] commented 6 months ago

👋 @Qualia-Li

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.

Qualia-Li commented 6 months ago

this fixes the issue

https://github.com/bubkoo/html-to-image/issues/431