PHPackages                             yiirocks/svg-inline - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. yiirocks/svg-inline

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

yiirocks/svg-inline
===================

Inline SVG Images for Yii

1.0.2(1mo ago)29362MITPHPPHP &gt;=8.2CI passing

Since Mar 13Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/YiiRocks/svg-inline)[ Packagist](https://packagist.org/packages/yiirocks/svg-inline)[ Docs](https://www.yii.rocks/svg-inline/)[ RSS](/packages/yiirocks-svg-inline/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (27)Versions (4)Used By (2)

Inline SVG Images for Yii
=========================

[](#inline-svg-images-for-yii)

> **inline**
> ***/ˈɪnlʌɪn/***
> *adjective*
>
> included as part of the main text on a page, rather than in a separate section

This extension provides simple functions for [Yii framework 3.0](http://www.yiiframework.com/) applications to add SVG Images inline.

[![Packagist Version](https://camo.githubusercontent.com/77298ac940dcfd92ef8fe2dab8d568b4c4bd5d704d7a1bf0f39a499032fe235d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f796969726f636b732f7376672d696e6c696e652e737667)](https://packagist.org/packages/yiirocks/svg-inline)[![PHP from Packagist](https://camo.githubusercontent.com/a20ad013258955efe80925211ec59a6a32e1af81d5775c2e9c6e966566703d8e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f796969726f636b732f7376672d696e6c696e652e737667)](https://php.net/)[![Packagist](https://camo.githubusercontent.com/93205f712e45130240efb26c49078b0f14de5c3b8376f642a156af424e5821e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f796969726f636b732f7376672d696e6c696e652e737667)](https://packagist.org/packages/yiirocks/svg-inline)[![GitHub](https://camo.githubusercontent.com/4767992a10ac77eaadd4a3352322e12c5255f9cf2f49f614c5e9ca6060ea398d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f796969726f636b732f7376672d696e6c696e652e737667)](https://github.com/yiirocks/svg-inline/blob/master/LICENSE)

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

[](#installation)

The package could be installed via composer:

```
composer require yiirocks/svg-inline
```

It can be extended with [Bootstrap](https://getbootstrap.com/) [Icons](https://icons.getbootstrap.com/) and/or [Font Awesome](https://fontawesome.com/) [Icons](https://fontawesome.com/icons):

```
composer require yiirocks/svg-inline-bootstrap
composer require yiirocks/svg-inline-fontawesome
```

Usage
-----

[](#usage)

The default configuration will enable `$svg` in any view.

```
echo $svg->file('@assets/image.svg');
```

Available options can be found in the [documentation](https://www.yii.rocks/svg-inline/).

Unit testing
------------

[](#unit-testing)

The package is tested with [Psalm](https://psalm.dev/) and [PHPUnit](https://phpunit.de/). To run tests:

```
composer psalm
composer phpunit
```

[![Maintainability](https://camo.githubusercontent.com/f89855b303fc2a82039fefc2c77314c687179e444b570fdb67876f8e55c11b12/68747470733a2f2f716c74792e73682f6261646765732f34636232613662612d323966342d343933332d383833632d3162316666306636303832352f6d61696e7461696e6162696c6974792e737667)](https://qlty.sh/gh/YiiRocks/projects/svg-inline)[![Codacy branch grade](https://camo.githubusercontent.com/1463e1d4c28eb58eb8e227a162ef111f41937ffc42c5c41dd76732e4fb75f406/68747470733a2f2f696d672e736869656c64732e696f2f636f646163792f67726164652f31613832363832393537366434353636386137363661626161653233323162622f6d61737465722e737667)](https://app.codacy.com/gh/YiiRocks/svg-inline)[![GitHub Workflow Status](https://camo.githubusercontent.com/686adf200a5da697cb23af8f65b8815a5580189c9acef3364eea3b2f260728f1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f596969526f636b732f7376672d696e6c696e652f706870756e69742e796d6c3f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/686adf200a5da697cb23af8f65b8815a5580189c9acef3364eea3b2f260728f1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f596969526f636b732f7376672d696e6c696e652f706870756e69742e796d6c3f6272616e63683d6d6173746572)

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance90

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.9% 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 ~186 days

Total

3

Last Release

51d ago

PHP version history (2 changes)1.0.0PHP &gt;=8.1

1.0.2PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/1957a3dc890165f142079565dc6b0ef59c26838a36fba5f052985e34612ce269?d=identicon)[mr42](/maintainers/mr42)

---

Top Contributors

[![Mister-42](https://avatars.githubusercontent.com/u/68641750?v=4)](https://github.com/Mister-42 "Mister-42 (73 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (13 commits)")

---

Tags

extensioniconiconsinlineinline-svg-imagessvgyiiyii3yii3-extensionsiconssvgextensionyiiiconinlineyii3

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[kartik-v/yii2-icons

Set of icon frameworks for use in Yii Framework 2.0

73970.3k34](/packages/kartik-v-yii2-icons)[fortawesome/wordpress-fontawesome

Official Font Awesome WordPress plugin composer package.

662.1k](/packages/fortawesome-wordpress-fontawesome)

PHPackages © 2026

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