Skip to main content


Travis AppVeyor Dependencies Dependencies Known Vulnerabilities Coverage Status Greenkeeper badge npm npm 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.





With npm:

npm install --save gatsby-plugin-zopfli

Or with Yarn:

yarn add gatsby-plugin-zopfli


In your gatsby-config.js file add:

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


Osmond van Hemert

Github NPM Twitter Web


See the file for details.


Want to help me out by giving a donation? Check out these options:

Patreon Coinbase PayPal Ko-fi


Licensed under MIT.

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