Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vzhou842/gatsby-plugin-optimize-svgs
A Gatsby Plugin to minify SVGs output to the filesystem during the build.
https://github.com/vzhou842/gatsby-plugin-optimize-svgs
gatsby gatsby-plugin minify optimize svg
Last synced: 2 months ago
JSON representation
A Gatsby Plugin to minify SVGs output to the filesystem during the build.
- Host: GitHub
- URL: https://github.com/vzhou842/gatsby-plugin-optimize-svgs
- Owner: vzhou842
- License: mit
- Created: 2019-07-31T03:07:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-30T18:45:34.000Z (over 2 years ago)
- Last Synced: 2024-09-30T10:17:54.929Z (3 months ago)
- Topics: gatsby, gatsby-plugin, minify, optimize, svg
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/gatsby-plugin-optimize-svgs
- Size: 178 KB
- Stars: 37
- Watchers: 4
- Forks: 4
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gatsby-plugin-optimize-svgs
[![Build Status](https://travis-ci.com/vzhou842/gatsby-plugin-optimize-svgs.svg?branch=master)](https://travis-ci.com/vzhou842/gatsby-plugin-optimize-svgs)
A [Gatsby](https://www.gatsbyjs.org/) Plugin to minify SVGs output to the filesystem during the build. Uses [svgo](https://github.com/svg/svgo) under the hood to minify SVGs.
Read the [blog post](https://victorzhou.com/blog/minify-svgs/) on minifying SVGs for some more context.
## Usage
Install:
```
$ npm install gatsby-plugin-optimize-svgs
```Add to `gatsby-config.js`:
```js
module.exports = {
plugins: [
'gatsby-plugin-optimize-svgs',
],
};
```## Example Output
```
59 SVGs minified, reducing the total size from 447780 bytes to 208237 bytes, a reduction of 53.5%!
```