svg-to-png

Convert SVG files to PNG images using the resvg-js library.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/fabioc-aloha/Extensions --skill svg-to-png-fabioc-aloha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: svg-to-png
Source: https://github.com/fabioc-aloha/Extensions/tree/main/.github/skills/svg-to-png
Command: npx skills add https://github.com/fabioc-aloha/Extensions --skill svg-to-png-fabioc-aloha

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides accurate, anti-aliased conversion of Scalable Vector Graphics (SVG) files into Portable Network Graphics (PNG) format, ensuring high fidelity rendering.

Core Features & Use Cases

  • Accurate Rendering: Utilizes the resvg-js engine for precise gradient, path, and font rendering, overcoming limitations of tools like ImageMagick.
  • Versatile Conversion: Supports conversion of individual SVG files to PNG with options for specifying output width and handling system fonts.
  • Use Case: Convert all SVG banners for your VS Code extensions into PNG format, ensuring consistent branding and display across different platforms.

Quick Start

Convert the file 'logo.svg' to 'logo.png' with a width of 512 pixels.

Frequently Asked Questions about svg-to-png

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert SVG files to PNG without losing gradient or font fidelity?

To convert SVG to PNG with high fidelity, this Skill uses the resvg-js engine to accurately render gradients, paths, and system fonts, overcoming common rendering limitations found in other image conversion tools.

What is the best way to render SVG banners into PNG format for application extensions?

Rendering SVG banners into PNG format is best achieved using resvg-js, which ensures pixel-perfect, anti-aliased visual assets and consistent branding across platforms by accurately processing vector graphics.

Do I need Node.js installed to convert SVG files to PNG images?

Yes, you need a Node.js environment with the @resvg/resvg-js package installed to execute the SVG to PNG conversion and ensure accurate rendering of your vector graphics.

Can I specify the output width when converting an SVG to a PNG image?

Yes, you can specify the exact output width in pixels when converting an SVG to a PNG image, allowing you to generate scaled visual assets like application icons or banners as needed.

Why does ImageMagick fail to accurately render my SVG gradients and paths in PNG?

ImageMagick often struggles with SVG gradients and paths, but converting SVG to PNG using the resvg-js engine ensures accurate, anti-aliased rendering of complex vector elements and system fonts.

Does this SVG to PNG conversion handle system fonts correctly?

Yes, this SVG to PNG conversion handles system fonts correctly by utilizing the resvg-js library, ensuring that text within your vector files renders accurately in the final PNG output.