{"id":21405773,"url":"https://github.com/ovhemert/gatsby-plugin-zopfli","last_synced_at":"2025-07-13T23:30:48.399Z","repository":{"id":32898137,"uuid":"145458581","full_name":"ovhemert/gatsby-plugin-zopfli","owner":"ovhemert","description":"Gatsby plugin for preparing zopfli-compressed versions of assets","archived":false,"fork":false,"pushed_at":"2023-11-30T14:36:44.000Z","size":699,"stargazers_count":13,"open_issues_count":6,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-15T03:39:33.912Z","etag":null,"topics":["compress","gatsby","gatsby-plugin","gzip","zopfli"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ovhemert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["ovhemert"],"patreon":"ovhemert","ko_fi":"ovhemert","custom":"ovhemert.dev/donate"}},"created_at":"2018-08-20T18:56:49.000Z","updated_at":"2023-05-12T16:52:05.000Z","dependencies_parsed_at":"2023-11-30T15:47:14.393Z","dependency_job_id":null,"html_url":"https://github.com/ovhemert/gatsby-plugin-zopfli","commit_stats":{"total_commits":82,"total_committers":9,"mean_commits":9.11111111111111,"dds":"0.29268292682926833","last_synced_commit":"f9afb3390739e963ee2fc36997a09255cc7214e8"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovhemert%2Fgatsby-plugin-zopfli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovhemert%2Fgatsby-plugin-zopfli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovhemert%2Fgatsby-plugin-zopfli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovhemert%2Fgatsby-plugin-zopfli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ovhemert","download_url":"https://codeload.github.com/ovhemert/gatsby-plugin-zopfli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225929081,"owners_count":17546882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compress","gatsby","gatsby-plugin","gzip","zopfli"],"created_at":"2024-11-22T16:28:17.079Z","updated_at":"2024-11-22T16:28:18.396Z","avatar_url":"https://github.com/ovhemert.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ovhemert","https://patreon.com/ovhemert","https://ko-fi.com/ovhemert","ovhemert.dev/donate"],"categories":[],"sub_categories":[],"readme":"# gatsby-plugin-zopfli\n\n[![CI](https://github.com/ovhemert/gatsby-plugin-zopfli/workflows/CI/badge.svg)](https://github.com/ovhemert/gatsby-plugin-zopfli/actions)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/6b2619c09ca94862bf349f40eb913466)](https://www.codacy.com/app/ovhemert/gatsby-plugin-zopfli?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=ovhemert/gatsby-plugin-zopfli\u0026amp;utm_campaign=Badge_Grade)\n[![Known Vulnerabilities](https://snyk.io/test/npm/gatsby-plugin-zopfli/badge.svg)](https://snyk.io/test/npm/gatsby-plugin-zopfli)\n[![Coverage Status](https://coveralls.io/repos/github/ovhemert/gatsby-plugin-zopfli/badge.svg)](https://coveralls.io/github/ovhemert/gatsby-plugin-zopfli)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)\n\nGatsby plugin for preparing zopfli-compressed gzip versions of assets.\n\nThe 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\n\nThe 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.\n\nFiles compressed with Zopfli can be decompressed with existing methods on the client and there will be no performance penalty at this end.\n\n```bash\n/webpack-runtime-cde5506958f1afc4d89e.js\n```\nbecomes\n```bash\n/webpack-runtime-cde5506958f1afc4d89e.js.gz\n```\n\n## Requirements\n\nThis plugin wil only generate the compressed files. To see them been served to the client, your Gatsby website should run on a production server that supports GZip. The Gatsby development server **does not** serve the compressed versions.\n\n## Installation\n\nWith npm:\n\n```bash\nnpm install --save gatsby-plugin-zopfli\n```\n\nOr with Yarn:\n\n```bash\nyarn add gatsby-plugin-zopfli\n```\n\n## Usage\n\nIn your `gatsby-config.js` file add:\n\n```javascript\nmodule.exports = {\n  plugins: [\n    {\n      resolve: 'gatsby-plugin-zopfli'\n    }\n  ]\n}\n```\n\nBy default, only `.css` and `.js` files are compressed, but you can override this with the `extensions` option.\n\n```javascript\nmodule.exports = {\n  plugins: [\n    {\n      resolve: 'gatsby-plugin-zopfli',\n      options: {\n        extensions: ['css', 'html', 'js', 'svg']\n      }\n    }\n  ]\n}\n```\n\nYou can even place all the zopfli-compressed files in a dedicated directory (ex. `public/zopfli`):\n\n```javascript\nmodule.exports = {\n  plugins: [\n    {\n      resolve: 'gatsby-plugin-zopfli',\n      options: {\n        path: 'zopfli'\n      }\n    }\n  ]\n}\n```\n\nTo customize compression, you can add optional parameters to the zopfli library: ([see here for details on various options)](https://github.com/pierreinglebert/node-zopfli#options)\n\n```javascript\nmodule.exports = {\n  plugins: [\n    {\n      resolve: 'gatsby-plugin-zopfli',\n      options: {\n        path: 'zopfli',\n          numiterations: 25\n      }\n    }\n  ]\n}\n```\n\nFor diagnostic information, you can enable verbose logging:\n\n```javascript\nmodule.exports = {\n  plugins: [\n    {\n      resolve: 'gatsby-plugin-zopfli',\n      options: {\n        verbose: true\n      }\n    }\n  ]\n}\n```\n\n## Maintainers\n\nOsmond van Hemert\n[![Github](https://img.shields.io/badge/-website.svg?style=social\u0026logoColor=333\u0026logo=github)](https://github.com/ovhemert)\n[![Web](https://img.shields.io/badge/-website.svg?style=social\u0026logoColor=333\u0026logo=nextdoor)](https://ovhemert.dev)\n\n## Contributing\n\nIf you would like to help out with some code, check the [details](./docs/CONTRIBUTING.md).\n\nNot a coder, but still want to support? Have a look at the options available to [donate](https://ovhemert.dev/donate).\n\n## Sponsors\n\n[![BrowserStack](./docs/assets/browserstack-logo.svg)](https://www.browserstack.com/)\n\n## License\n\nLicensed under [MIT](./LICENSE).\n\n_NOTE: This plugin only generates output when run in `production` mode!_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovhemert%2Fgatsby-plugin-zopfli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovhemert%2Fgatsby-plugin-zopfli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovhemert%2Fgatsby-plugin-zopfli/lists"}