SVGER-CLI includes a powerful built-in optimizer that achieves 57.77% file size reduction without requiring SVGO or any external dependencies.
Faster processing, lighter bundle, and zero configuration needed.
Compare the old way versus the new approach and see the dramatic difference.
Adds ~500KB to your project
2x slower than built-in
Requires plugin setup
Compatibility issues
npm install svgo required
Nothing to install
Optimized algorithms
No configuration needed
Built into SVGER-CLI
Up to 57.77% reduction
Choose the right balance between file size, processing speed, and safety for your use case.
Best for development and most production use cases
import { SVGProcessor, OptLevel } from 'svger-cli';
const processor = SVGProcessor.getInstance();
processor.setOptimizationLevel(OptLevel.BALANCED);
const optimized = await processor.cleanSVGContent(svgString);
// Result: 43.33% reduction (safe + fast)
For CI/CD builds and production bundles
processor.setOptimizationLevel(OptLevel.AGGRESSIVE);
const optimized = await processor.cleanSVGContent(svgString);
// Result: 48.91% reduction (balanced performance)
Maximum compression for production assets
processor.setOptimizationLevel(OptLevel.MAXIMUM);
const optimized = await processor.cleanSVGContent(svgString);
// Result: 57.77% reduction (maximum compression!)
The optimizer uses a sophisticated 5-phase pipeline to achieve maximum compression:
Foundation cleaning
Removes unnecessary elements, comments, metadata, and XML declarations that add no visual value.
BALANCED level and above
AGGRESSIVE level and above
MAXIMUM level only
Real-world results from production SVG optimization across different file types.
The optimizer is automatically applied when processing SVGs. No extra configuration needed!
Optimizer is enabled by default with BALANCED level for safe, fast optimization.
# Optimizer is enabled by default with BALANCED level
svger-cli --src ./icons --out ./components
# Output: 43.33% size reduction automatically applied
Use the optimize plugin for MAXIMUM level (57.77% reduction).
# Use the optimize plugin for MAXIMUM level
svger-cli --src ./icons --out ./components --plugin optimize
# Or combine with other plugins
svger-cli --src ./icons --out ./components --plugins optimize,minify
If you need to disable optimization (not recommended for production).
# If you need to disable optimization (not recommended)
svger-cli --src ./icons --out ./components --no-optimize
See how SVGER-CLI's built-in optimizer compares to the industry-standard SVGO tool.