Skip to main content
.com
Skip to main content
Algolia
View plugin on GitHub
See starters using this

gatsby-plugin-zopfli

Travis AppVeyor Codacy Badge Known Vulnerabilities Greenkeeper badge js-standard-style

Gatsby plugin for preparing zopfli-compressed gzip versions of assets.

The Zopfli Compression Algorithm is a new, open sourced data compression library. It creates a smaller output size, typically 3–8% smaller compared to zlib at maximum compression

The compression method is best suited for static web content, files that don’t change that often and that generate a lot of traffic. That’s because Zopfli uses two to three times more CPU time than zlib at maximum quality.

Files compressed with Zopfli can be decompressed with existing methods on the client and there will be no performance penalty at this end.

/webpack-runtime-cde5506958f1afc4d89e.js

becomes

/webpack-runtime-cde5506958f1afc4d89e.js.gz

Installation

With npm:

npm install --save gatsby-plugin-zopfli

Or with Yarn:

yarn add gatsby-plugin-zopfli

Usage

In your gatsby-config.js file add:

module.exports = {
  plugins: [
    {
      resolve: 'gatsby-plugin-zopfli'
    }
  ]
}

Maintainers

Osmond van Hemert Github Web

Contributing

See the CONTRIBUTING file for details.

License

Licensed under MIT.

NOTE: This plugin only generates output when run in production mode!


Docs
Tutorial
Plugins
Blog
Showcase