You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .changeset/cyan-tables-poke.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,29 +6,30 @@ Adds experimental SVGO optimization support for SVG assets
6
6
7
7
Astro now supports automatic SVG optimization using SVGO during build time. This experimental feature helps reduce SVG file sizes while maintaining visual quality, improving your site's performance.
8
8
9
-
To enable SVG optimization, add the following to your `astro.config.mjs`:
9
+
To enable SVG optimization with default settings, add the following to your `astro.config.mjs`:
10
10
```js
11
11
import { defineConfig } from'astro/config';
12
12
13
13
exportdefaultdefineConfig({
14
14
experimental: {
15
-
svg: {
16
-
optimize:true,
17
-
},
15
+
svgo:true,
18
16
},
19
17
});
20
18
```
21
19
22
-
With SVG optimization enabled, you can further customize behavior with [SVGO plugins](https://svgo.dev/docs/plugins/):
20
+
To customize optimization, pass a [SVGO configuration object](https://svgo.dev/docs/plugins/):
`Invalid or outdated experimental feature.\nCheck for incorrect spelling or outdated Astro version.\nSee https://docs.astro.build/en/reference/experimental-flags/ for a list of all current experiments.`,
0 commit comments