Inline SVG Images for Yii

Installs: 481

Dependents: 2

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0


dev-master / 1.0.x-dev 2021-03-25 16:09 UTC

This package is auto-updated.

Last update: 2021-03-25 16:10:02 UTC



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 applications to add SVG Images inline.

Packagist Version PHP from Packagist Packagist GitHub


The package could be installed via composer:

composer require yiirocks/svg-inline

It can be extended with Bootstrap Icons and/or Font Awesome Icons:

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


The default configuration will enable $svg in any view.

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

Available options can be found in the documentation.

Unit testing

The package is tested with PHPUnit. To run tests:


Code Climate maintainability Codacy branch grade Scrutinizer code quality (GitHub/Bitbucket) GitHub Workflow Status