php-svg-lib icon indicating copy to clipboard operation
php-svg-lib copied to clipboard

Optimize SVG files

Open MathiasReker opened this issue 6 months ago • 1 comments

I noticed your project, and I’d like to suggest using my PHP library to automatically optimize them the SVG files. It’s designed to reduce SVG size while preserving visual quality, and it integrates easily into PHP projects.

Here’s a minimal usage example:

<?php

declare(strict_types=1);

require_once __DIR__ . '/vendor/autoload.php';

use MathiasReker\PhpSvgOptimizer\Service\Facade\SvgOptimizerFacade;

$content = '<svg>...</svg>';

$content = SvgOptimizerFacade::fromString($content)->optimize()->getContent()

Link to the project: https://github.com/MathiasReker/php-svg-optimizer

Let me know if I can help. :-)

MathiasReker avatar Jul 31 '25 20:07 MathiasReker

Happy to take a look.

bsweeney avatar Jul 31 '25 21:07 bsweeney