{"id":13396872,"url":"https://github.com/gruntjs/grunt-contrib-imagemin","last_synced_at":"2025-05-14T07:10:45.730Z","repository":{"id":5263450,"uuid":"6441855","full_name":"gruntjs/grunt-contrib-imagemin","owner":"gruntjs","description":"Minify PNG, JPG, GIF and SVG images.","archived":false,"fork":false,"pushed_at":"2024-07-02T05:13:08.000Z","size":618,"stargazers_count":1215,"open_issues_count":7,"forks_count":177,"subscribers_count":37,"default_branch":"main","last_synced_at":"2025-04-24T10:44:36.078Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"https://gruntjs.com","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/gruntjs.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"authors","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-10-29T14:28:59.000Z","updated_at":"2025-04-07T10:18:44.000Z","dependencies_parsed_at":"2024-06-18T11:14:26.754Z","dependency_job_id":"f3ce47bd-4c62-47cd-949b-b7a0e23b20ef","html_url":"https://github.com/gruntjs/grunt-contrib-imagemin","commit_stats":{"total_commits":194,"total_committers":39,"mean_commits":"4.9743589743589745","dds":0.6391752577319587,"last_synced_commit":"beefd1a6436dec543b039d145cac62b016033acd"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruntjs%2Fgrunt-contrib-imagemin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruntjs%2Fgrunt-contrib-imagemin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruntjs%2Fgrunt-contrib-imagemin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruntjs%2Fgrunt-contrib-imagemin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gruntjs","download_url":"https://codeload.github.com/gruntjs/grunt-contrib-imagemin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252466431,"owners_count":21752353,"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":["hacktoberfest"],"created_at":"2024-07-30T18:01:05.495Z","updated_at":"2025-05-14T07:10:40.710Z","avatar_url":"https://github.com/gruntjs.png","language":"JavaScript","funding_links":[],"categories":["Image Optimizers","Uncategorized"],"sub_categories":["Meetups","Uncategorized"],"readme":"# grunt-contrib-imagemin [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-imagemin.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-imagemin) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/7w491e6edsuanreu/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-imagemin/branch/master)\n\n\u003e Minify images using [imagemin](https://github.com/imagemin/imagemin)\n\n\n## Install\n\n```sh\nnpm install --save-dev grunt-contrib-imagemin\n```\n\n\n## Usage\n\n```js\nconst mozjpeg = require('imagemin-mozjpeg');\n\ngrunt.initConfig({\n    imagemin: {\n        static: {\n            options: {\n                optimizationLevel: 3,\n                svgoPlugins: [{removeViewBox: false}],\n                use: [mozjpeg()] // Example plugin usage\n            },\n            files: {\n                'dist/img.png': 'src/img.png',\n                'dist/img.jpg': 'src/img.jpg',\n                'dist/img.gif': 'src/img.gif'\n            }\n        },\n        dynamic: {\n            files: [{\n                expand: true,\n                cwd: 'src/',\n                src: ['**/*.{png,jpg,gif}'],\n                dest: 'dist/'\n            }]\n        }\n    }\n});\n\ngrunt.loadNpmTasks('grunt-contrib-imagemin');\ngrunt.registerTask('default', ['imagemin']);\n```\n\n\n## Options\n\n### optimizationLevel *(png)*\n\n* Type: `number`\n* Default: `3`\n\nSelect optimization level between `0` and `7`.\n\n\u003e The optimization level 0 enables a set of optimization operations that require minimal effort. There will be no changes to image attributes like bit depth or color type, and no recompression of existing IDAT datastreams. The optimization level 1 enables a single IDAT compression trial. The trial chosen is what OptiPNG thinks it’s probably the most effective. The optimization levels 2 and higher enable multiple IDAT compression trials; the higher the level, the more trials.\n\nLevel and trials:\n\n1. 1 trial\n2. 8 trials\n3. 16 trials\n4. 24 trials\n5. 48 trials\n6. 120 trials\n7. 240 trials\n\n### progressive *(jpg)*\n\n* Type: `boolean`\n* Default: `true`\n\nLossless conversion to progressive.\n\n### interlaced *(gif)*\n\n* Type: `boolean`\n* Default: `true`\n\nInterlace gif for progressive rendering.\n\n### svgoPlugins *(svg)*\n\nType: `Array`\n\nCustomize which SVGO plugins to use. [More here](https://github.com/sindresorhus/grunt-svgmin#available-optionsplugins).\n\n### use\n\n* Type: `Array`\n* Default: `[imagemin.gifsicle(), imagemin.jpegtran(), imagemin.optipng(), imagemin.svgo()]`\n\n[Plugins](https://www.npmjs.com/browse/keyword/imageminplugin) to use with imagemin. It comes bundled with the following **lossless** optimizers:\n\n- [gifsicle](https://github.com/imagemin/imagemin-gifsicle) — *Compress GIF images*\n- [jpegtran](https://github.com/imagemin/imagemin-jpegtran) — *Compress JPEG images*\n- [optipng](https://github.com/imagemin/imagemin-optipng) — *Compress PNG images*\n- [svgo](https://github.com/imagemin/imagemin-svgo) — *Compress SVG images*\n\nThese are bundled for convenience and most users will not need anything else.\n\n### concurrency\n\n* Type: `number`\n* Default: `os.cpus().length`\n\nControl the maximum number of image optimizations that may be performed in parallel.\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgruntjs%2Fgrunt-contrib-imagemin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgruntjs%2Fgrunt-contrib-imagemin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgruntjs%2Fgrunt-contrib-imagemin/lists"}