PHPackages                             arindam/svg - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. arindam/svg

ActiveLaravel-package[File &amp; Storage](/categories/file-storage)

arindam/svg
===========

A laravel package that convert SVG code to image file and download as well

v1.0.1(2y ago)19MITPHPPHP &gt;=5.4.0

Since Apr 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/dev-arindam-roy/laravel-svg-package)[ Packagist](https://packagist.org/packages/arindam/svg)[ RSS](/packages/arindam-svg/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (3)Used By (0)

Laravel SVG Handler
===================

[](#laravel-svg-handler)

### A laravel package that convert SVG code to image file and download as well

[](#a-laravel-package-that-convert-svg-code-to-image-file-and-download-as-well)

Installation
------------

[](#installation)

> **No dependency on PHP version and LARAVEL version**

### STEP 1: Run the composer command:

[](#step-1-run-the-composer-command)

```
composer require arindam/svg
```

### STEP 2: Laravel without auto-discovery:

[](#step-2-laravel-without-auto-discovery)

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

> In providers section

```
Arindam\Svg\ArindamSvgServiceProvider::class,
```

> In aliases section

```
'SVG' => Arindam\Svg\Svg\SvgClassFacade::class,
```

All Done! Now it ready to use
-----------------------------

[](#all-done-now-it-ready-to-use)

```
// sample raw svg code
$rawSvgCode = '';
```

> \*\*If You Want To Convert Any Raw SVG Code To .svg Image File

```
// just pass the raw svg code
SVG::svgCodeToImageSave($rawSvgCode));
// OUTPUT:

// also want, you can pass file name as well
SVG::svgCodeToImageSave($rawSvgCode, "mysvg.svg"));
//OUTPUT: mysvg.svg
```

> \*\*If You Want To Convert &amp; Download it as well

```
$svg = SVG::svgCodeToImageDownload($rawSvgCode);
return response()->download($svg, "mysvg2.svg", array('Content-type' => 'image/svg+xml'));
```

> \*\*If You Want To Directly Render the SVG in a Link

```
$svg = SVG::svgCodeToImageRender($rawSvgCode);
return response($svg, 200, array('Content-type' => 'image/svg+xml'));
```

license:
--------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/dev-arindam-roy/laravel-svg-package/blob/master/LICENSE) for more information.

Post Issues: if found any
-------------------------

[](#post-issues-if-found-any)

If have any issue please [write me](https://github.com/dev-arindam-roy/laravel-svg-package/issues).

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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 ~0 days

Total

2

Last Release

806d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/58600558?v=4)[devarindam](/maintainers/devarindam)[@devarindam](https://github.com/devarindam)

---

Top Contributors

[![dev-arindam-roy](https://avatars.githubusercontent.com/u/24665327?v=4)](https://github.com/dev-arindam-roy "dev-arindam-roy (4 commits)")

---

Tags

laravel-svgsvg-downloaderarindam-roydevarindamdev-arindam-roysvg-image-downloadsvg-code-to-image

### Embed Badge

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

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

###  Alternatives

[api-platform/laravel

API Platform support for Laravel

58171.5k14](/packages/api-platform-laravel)[illuminate/filesystem

The Illuminate Filesystem package.

16165.1M3.2k](/packages/illuminate-filesystem)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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