Skip to content
A Gatsby Plugin to minify SVGs output to the filesystem during the build.
JavaScript
Branch: master
Clone or download
Latest commit 71f1ad5 Aug 2, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.eslintrc Initial Commit Jul 31, 2019
.gitignore Initial Commit Jul 31, 2019
.npmignore
.travis.yml Create .travis.yml Jul 31, 2019
LICENSE Create LICENSE Jul 31, 2019
README.md Update README.md Aug 2, 2019
gatsby-node.js Syntax edits for readability Jul 31, 2019
index.js Add index.js Jul 31, 2019
package-lock.json Bump version to 1.0.3 Jul 31, 2019
package.json Bump version to 1.0.3 Jul 31, 2019

README.md

gatsby-plugin-optimize-svgs

Build Status

A Gatsby Plugin to minify SVGs output to the filesystem during the build. Uses svgo under the hood to minify SVGs.

Read the blog post on minifying SVGs for some more context.

Usage

Install:

$ npm install gatsby-plugin-optimize-svgs

Add to gatsby-config.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%!
You can’t perform that action at this time.