I am working on a project where I gather data from a user and retrieve stats from their other publicly accessible profiles. Based on this, I generate profile cards or images to display that data.
The challenge I’m facing is that I’m able to fetch the user’s details using API calls, but I’m struggling to convert those details into images. I’ve tried using libraries like html-2-image and dom-to-image, but I encountered an issue. In the case of html-2-image, the HTML needs to be rendered in the document to generate the image. However, I don’t want the HTML to be visible to the user. To work around this, I tried setting the display to "none," but then neither html-2-image nor dom-to-image seems to work.
I came across some references and articles (like the one on StackOverflow) here, and I’m wondering if learning SVG creation is necessary to achieve this.
Can anyone suggest a solution or guide me in the right direction?