Download the PHP package vestaware/svg-sprite-generator without Composer
On this page you can find all versions of the php package vestaware/svg-sprite-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vestaware/svg-sprite-generator
More information about vestaware/svg-sprite-generator
Files in vestaware/svg-sprite-generator
Package svg-sprite-generator
Short Description A PHP library to optimize SVG files and generate SVG sprites.
License MIT
Informations about the package svg-sprite-generator
SVG Sprite Generator
A PHP library to optimize SVG files and generate an SVG sprite.
Installation
Install the package using Composer:
Usage
Example:
Features
- Removes unnecessary attributes like
id
,xmlns
, and others. - Retains only
viewBox
and optionallyfill
attributes. - Removes
<g>
tags completely. - Supports versioning for the generated sprite file.
- Generates a manifest file mapping the base file name to the versioned file name.
- Automatically deletes old versions of the sprite file to save space.
Output Example
The generated SVG sprite will look like this:
Example Manifest
The manifest file contains the mapping of the base file name to the versioned file name:
License
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.