bubkoo / html-to-image

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

support webp format #326

Closed lili21 closed 1 year ago

lili21 commented 1 year ago

Expected Behavior

webp format image should get correct contentType

Possible Solution

https://github.com/bubkoo/html-to-image/blob/f0b3cdf53836475e4a30e8a903f79e5561fec9c9/src/mimes.ts#L3-L14

we can add the webp property to the mimes object

Additional Context

vivcat[bot] commented 1 year ago

👋 @lili21

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.

happy-func commented 1 year ago

+1

pixelninja commented 1 year ago

+1

pixelninja commented 1 year ago

and future proof it with avif format too ;)

vivcat[bot] commented 7 months ago

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.