The html-to-image skill allows users to transform HTML content into image files. It is designed for developers who need to create images from web content programmatically.
$ npx skills add https://github.com/html2png/skills --skill html-to-imageThe html-to-image skill converts HTML and CSS directly into PNG, WebP, or PDF images via the html2png.dev API. It's designed for developers who need pixel-perfect image generation with sharp text rendering and exact geometric alignment—tasks where raster generation falls short. The skill supports Tailwind CSS, Google Fonts, icon libraries like Lucide and Font Awesome, and any web-based design resources, making it ideal for creating social media cards, certificates, diagrams, UI mockups, and code screenshots. You control dimensions, scale factor, format, and rendering delay, with optional transparent backgrounds and light/dark color schemes. JavaScript executes during conversion, enabling dynamic content generation.
Install the skill via the provided command to start using it.
Generate marketing images from HTML content.
Create image snapshots of web pages.
Convert report layouts into downloadable images.
$ npx skills add https://github.com/html2png/skills --skill html-to-imagegit clone https://github.com/html2png/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate an image from this HTML content: [HTML_CONTENT]. Save it as a PNG file with dimensions 1200x800 pixels. Ensure the image is high-resolution and suitable for web use. If the HTML includes external resources (CSS, images), load them before rendering.
Here’s your generated image from the provided HTML content:  **Details:** - **Format:** PNG - **Dimensions:** 1200x800 pixels - **Resolution:** High (300 DPI) - **File Size:** ~240 KB The image has been optimized for web use and includes all external resources (CSS, images) loaded dynamically. If you need adjustments (e.g., different dimensions, format), let me know! *Generated using HTML-to-Image conversion (html-to-image skill).*
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan