PHPackages                             laratusk/larasvg - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. laratusk/larasvg

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

laratusk/larasvg
================

A modern Laravel package for SVG conversion with multiple provider support (Resvg, Inkscape, rsvg-convert). Convert SVG to PNG, PDF, EPS, and more.

v2.4.0(3mo ago)32978↑328.6%MITPHPPHP ^8.2CI failing

Since Feb 14Pushed 3mo agoCompare

[ Source](https://github.com/laratusk/larasvg)[ Packagist](https://packagist.org/packages/laratusk/larasvg)[ RSS](/packages/laratusk-larasvg/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (7)Dependencies (20)Versions (13)Used By (0)

 [![LaraSVG Banner](art/banner.png)](art/banner.png)

 [![Latest Version](https://camo.githubusercontent.com/593869ad7ae4df6b85b774f3b5050a37f492ecfc0db666d5387700cb4e1118a7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6172617475736b2f6c6172617376672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laratusk/larasvg) [![PHP Version](https://camo.githubusercontent.com/d7fd72ff7dff9fc1c6477a6b68966fb7f0c469039df24b44440f3a4883dc61ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6c6172617475736b2f6c6172617376672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laratusk/larasvg) [![Laravel Version](https://camo.githubusercontent.com/aa6b931f57c2b540b755cfaa1f774b2b0bb6624fc494cf8c092eaa6822b26666/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302e782d2d31332e782d7265643f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laratusk/larasvg) [![Tests](https://camo.githubusercontent.com/d64ab195b5c5921709d729c4fcc8787da1c528db3c5759121000f3ce01b35986/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c6172617475736b2f6c6172617376672f63692e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6162656c3d7465737473)](https://github.com/laratusk/larasvg/actions) [![License](https://camo.githubusercontent.com/f75d3bf5bc18b70cd7bb29a34470dc942d252e0e2c6faa73bcf5bf9d1c622e5c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6172617475736b2f6c6172617376672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laratusk/larasvg)

A modern Laravel package for SVG conversion with multiple provider support. Convert SVG files to PNG, PDF, EPS, and more using a fluent API and Laravel's Process facade.

Battle-Tested
-------------

[](#battle-tested)

> Backed by over 80 million SVG-to-format conversions in production across three years, this codebase is truly battle-tested. Releasing it as a package was the logical evolution.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 10.x, 11.x, 12.x, or 13.x
- At least one converter installed:
    - [Resvg](https://github.com/linebender/resvg) — recommended for PNG
    - [Inkscape](https://inkscape.org/) 1.0+ — for PDF, EPS, PS, EMF, WMF
    - [rsvg-convert](https://wiki.gnome.org/Projects/LibRsvg) — lightweight, PNG/PDF/PS/EPS/SVG
    - [CairoSVG](https://cairosvg.org/) — Python-based, PNG/PDF/PS/SVG

Quick Install
-------------

[](#quick-install)

```
composer require laratusk/larasvg
php artisan larasvg:setup
```

Documentation
-------------

[](#documentation)

Visit the **[full documentation](https://larasvg.laratusk.org)** for detailed guides, usage examples, API reference, and more.

Features
--------

[](#features)

- **Multi-provider architecture** — Switch between Resvg, Inkscape, rsvg-convert, and CairoSVG with a single method call
- **Resvg (default)** — Lightning-fast SVG to PNG conversion
- **Inkscape** — Full-featured SVG conversion to PNG, PDF, PS, EPS, EMF, WMF
- **rsvg-convert** — Lightweight librsvg tool for PNG, PDF, PS, EPS, and SVG output
- **CairoSVG** — Python-based converter using the Cairo 2D library; PNG, PDF, PS, SVG
- **Custom drivers** — Register your own converter via config or `SvgConverter::extend()` — no package code changes needed
- **Fluent API** — Chainable methods for dimensions, background, format, and provider-specific options
- **Laravel Filesystem** — Read from and write to any Laravel disk (S3, local, etc.)
- **Stdout output** — Pipe conversion output directly to stdout for streaming responses
- **Facade** — Clean `SvgConverter::` static API with IDE autocompletion
- **Testable** — Built on Laravel's Process facade with full `Process::fake()` support
- **Setup command** — Interactive `php artisan larasvg:setup` to detect and install providers

Supported Formats
-----------------

[](#supported-formats)

FormatResvgInkscapersvg-convertCairoSVGPNGYesYesYesYesPDF—YesYesYesSVG—YesYesYesPS—YesYesYesEPS—YesYes—EMF—Yes——WMF—Yes——Quick Start
-----------

[](#quick-start)

```
use Laratusk\Larasvg\Facades\SvgConverter;

// Default provider (Resvg)
SvgConverter::open(resource_path('svg/file.svg'))
    ->setFormat('png')
    ->setDimensions(1024, 1024)
    ->toFile(storage_path('app/output.png'));

// Switch provider per call
SvgConverter::using('inkscape')
    ->open(resource_path('svg/file.svg'))
    ->setFormat('pdf')
    ->toFile(storage_path('app/output.pdf'));

SvgConverter::using('cairosvg')
    ->open(resource_path('svg/file.svg'))
    ->setFormat('pdf')
    ->setScale(2.0)
    ->toFile(storage_path('app/output.pdf'));
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) for details.

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance81

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

7

Last Release

100d ago

Major Versions

v1.1.0 → v2.0.02026-02-15

PHP version history (2 changes)1.0.0PHP ^8.4

v2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/755245aa5e4ba6c690b039cedcce5a86cd01b4f00d490cd71f03e6377ac302d5?d=identicon)[laratusk](/maintainers/laratusk)

---

Top Contributors

[![azer1ghost](https://avatars.githubusercontent.com/u/27803185?v=4)](https://github.com/azer1ghost "azer1ghost (34 commits)")

---

Tags

laravelpdfconvertersvgvectorpngresvginkscapelibrsvgrsvg-convert

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/laratusk-larasvg/health.svg)

```
[![Health](https://phpackages.com/badges/laratusk-larasvg/health.svg)](https://phpackages.com/packages/laratusk-larasvg)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M195](/packages/laravel-ai)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.8k3](/packages/defstudio-telegraph)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
