DEV Community

Discussion on: Take Screenshot Of HTML Element Using JavaScript

Collapse
 
shash7 profile image
Shashwat amin

Is there any other robust alternative to html2canvas?

Collapse
 
dashpilot profile image
Dashpilot
Collapse
 
chris_hayes profile image
Chris Hayes

html-to-image worked better for me. The screenshots from html2canvas had styling issues where it didn't match what the page was showing. html-to-image was pretty much 1-for-1, the one thing I had to do was put a background color on the element I was imaging, or else it defaults to transparent regardless of what's behind the element.