# @cf-wasm/resvg

> A high-performance SVG renderer and toolkit, powered by Rust based resvg.

Latest version **0.4.0** (published 2026-08-01) · MPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install @cf-wasm/resvg
pnpm add @cf-wasm/resvg
yarn add @cf-wasm/resvg
bun add @cf-wasm/resvg
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads; large bundle; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2026-08-01 |
| First published | 2024-03-31 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 13.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 298 |
| Author | yisibl |
| Maintainers | kumardeo |
| Keywords | resvg, svg, resvg-js, resvg-wasm, rust, svg2png, svg2img, svg to png, wasm, cloudflare-workers |

## Links

- npm: https://www.npmjs.com/package/@cf-wasm/resvg
- Repository: https://github.com/fineshopdesign/cf-wasm
- Homepage: https://github.com/fineshopdesign/cf-wasm/tree/main/packages/resvg#readme
- Issues: https://github.com/fineshopdesign/cf-wasm/issues
- npm.io page: https://npm.io/package/@cf-wasm/resvg

## Dependencies (2)

- [@resvg/resvg-wasm](https://npm.io/package/@resvg/resvg-wasm.md) 2.6.2
- [@resvg/resvg-wasm-legacy](https://npm.io/package/@resvg/resvg-wasm-legacy.md) npm:@resvg/resvg-wasm@2.4.1

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 0.4.0 (latest) — 2026-08-01
- 0.3.5 — 2026-07-13
- 0.3.4 — 2026-05-03
- 0.3.3 — 2025-12-03
- 0.3.2 — 2025-11-29
- 0.3.1 — 2025-11-25
- 0.3.0 — 2025-11-25
- 0.2.3 — 2025-11-20
- 0.2.2 — 2025-11-15
- 0.2.1 — 2025-11-06
- 0.2.0 — 2025-11-05
- 0.1.24 — 2024-12-21
- 0.1.23 — 2024-12-08
- 0.1.22 — 2024-09-01
- 0.1.21 — 2024-06-29
- … 10 more at https://npm.io/package/@cf-wasm/resvg/versions

## README

# @cf-wasm/resvg

A high-performance SVG renderer and toolkit, powered by Rust based resvg.

Powered by [resvg-js](https://github.com/thx/resvg-js).

## Installation

```shell
npm install @cf-wasm/resvg       # npm
yarn add @cf-wasm/resvg          # yarn
pnpm add @cf-wasm/resvg          # pnpm
```

## Usage

Because `package.json` includes conditional exports for `node`, `workerd`, and `edge-light`, you can usually import directly from `@cf-wasm/resvg` and let the runtime choose the correct entrypoint:

```ts
import { Resvg } from "@cf-wasm/resvg";
```

If you want to be explicit, import from a submodule instead:

- Cloudflare Workers / Pages (Wrangler):

  ```ts
  import { Resvg } from "@cf-wasm/resvg/workerd";
  // To use v2.4.1 of @resvg/resvg-wasm, use the below instead
  import { Resvg } from "@cf-wasm/resvg/legacy/workerd";
  ```

- Next.js Edge Runtime:

  ```ts
  import { Resvg } from "@cf-wasm/resvg/edge-light";
  // To use v2.4.1 of @resvg/resvg-wasm, use the below instead
  import { Resvg } from "@cf-wasm/resvg/legacy/edge-light";
  ```

- Node.js (inline):

  ```ts
  import { Resvg } from "@cf-wasm/resvg/node";
  // To use v2.4.1 of @resvg/resvg-wasm, use the below instead
  import { Resvg } from "@cf-wasm/resvg/legacy/node";
  ```

## Documentation

It is recommended to use `Resvg.async()` async static method instead of `new Resvg()` constructor:

```tsx
import { Resvg } from "@cf-wasm/resvg/legacy/node";

// this is recommended
await Resvg.async("<svg...</svg>");

// instead of
new Resvg("<svg...</svg>");
```

For API reference, read official documentation at [resvg-js](https://github.com/thx/resvg-js/tree/main/wasm).

---
_Source: https://npm.io/package/@cf-wasm/resvg · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
