Skip to content

Commit 4bd321a

Browse files
committed
Merge branch 'patch-1' of https://github.com/MrPropre/image-optimizer into pr/140
2 parents a2960fb + 3b556ff commit 4bd321a

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/OptimizerChainFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static function create(array $config = []): OptimizerChain
4040
]))
4141

4242
->addOptimizer(new Svgo([
43-
'--disable={cleanupIDs,removeViewBox}',
43+
'--config=svgo.config.js',
4444
]))
4545

4646
->addOptimizer(new Gifsicle([

svgo.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const { extendDefaultPlugins } = require('svgo')
2+
3+
module.exports = {
4+
plugins: extendDefaultPlugins([
5+
{
6+
name: 'cleanupIDs',
7+
active: false
8+
},
9+
{
10+
name: 'removeViewBox',
11+
active: false
12+
}
13+
])
14+
}

0 commit comments

Comments
 (0)