{"id":13396875,"url":"https://github.com/somerandomdude/grunt-webp","last_synced_at":"2025-03-13T23:31:52.178Z","repository":{"id":8017040,"uuid":"9425799","full_name":"somerandomdude/grunt-webp","owner":"somerandomdude","description":"Convert your images to WebP format.","archived":false,"fork":false,"pushed_at":"2016-02-21T17:55:53.000Z","size":259,"stargazers_count":118,"open_issues_count":5,"forks_count":16,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-08T04:05:08.486Z","etag":null,"topics":[],"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/somerandomdude.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-14T07:19:55.000Z","updated_at":"2024-03-01T07:58:39.000Z","dependencies_parsed_at":"2022-09-18T11:50:52.365Z","dependency_job_id":null,"html_url":"https://github.com/somerandomdude/grunt-webp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somerandomdude%2Fgrunt-webp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somerandomdude%2Fgrunt-webp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somerandomdude%2Fgrunt-webp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somerandomdude%2Fgrunt-webp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/somerandomdude","download_url":"https://codeload.github.com/somerandomdude/grunt-webp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243500212,"owners_count":20300759,"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":[],"created_at":"2024-07-30T18:01:05.643Z","updated_at":"2025-03-13T23:31:51.854Z","avatar_url":"https://github.com/somerandomdude.png","language":"JavaScript","readme":"grunt-webp\n==========\n\nConvert your images to [WebP](https://developers.google.com/speed/webp/) format.\n\n## Getting Started\n\nTo install this plugin, open up the terminal, `cd` to your project's root directory and run the following command:\n\n```shell\nnpm install grunt-webp --save-dev\n```\n\nThis plugin depends on WebP's `cwebp` encoder. You'll need to install the [WebP Package](https://developers.google.com/speed/webp/download) or use [webp-bin](https://github.com/yuanyan/node-webp-bin)\n\nIn your `Gruntfile.js` file add the following line:\n\n```js\ngrunt.loadNpmTasks('grunt-webp');\n```\n\nThis plugin requires Grunt `~0.4.0`\n\n### Settings \n\n* __binpath (string)__ Location of the cwebp executable, default 'cwebp'. Use forward slashes as directory separator.\n* __quality (float)__ Quality factor (0:small..100:big).\n* __alphaQuality (integer)__ Transparency-compression quality (0..100)\n* __preset (string)__ Preset setting, one of: _default_, _photo_, _picture_, _drawing_, _icon_, _text_\n* __compressionMethod (integer)__ Compression method (0=fast, 6=slowest). \n* __segments (integer)__ Number of segments to use (1..4). \n* __psnr (float)__ Target PSNR (in dB. typically: 42). \n* __sns (integer)__ Spatial Noise Shaping (0:off, 100:max). \n* __filterStrength (integer)__ filter strength (0=off..100). \n* __filterSharpness (integer)__ Filter sharpness (0:most .. 7:least sharp). \n* __simpleFilter (boolean)__ Use simple filter (default is false). \n* __partitionLimit (integer)__ Limit quality to fit the 512k limit on the first partition (0=no degradation ... 100=full). \n* __analysisPass (integer)__ Analysis pass number (1..10). \n* __crop (array)__ Crop picture with the given rectangle. [x, y, width, height]\n* __resizeCrop (array)__ Resize picture (after any cropping). [width, height]\n* __multiThreading (boolean)__ Use multi-threading if available. \n* __lowMemory (boolean)__ Reduce memory usage (slower encoding). \n* __alphaMethod (string)__ Transparency-compression method (0..1). \n* __alphaFilter (string)__ Predictive filtering for alpha plane. One of: _none_, _fast_ (default) or _best_. \n* __alphaCleanup (boolean)__ Clean RGB values in transparent area. \n* __noAlpha (boolean)__ Discard any transparency information. \n* __lossless (boolean)__  Encode image losslessly.\n\n\n## Example\n\n\n```js\nmodule.exports = function(grunt) {\n\n  \n  grunt.initConfig({\n\t// WebP configuration\n    webp: {\n      files: {\n        //expand: true,\n        //cwd: 'path/to/source/images',\n        src: 'source/*.png',\n        dest: 'output/path/'\n      },\n      options: {\n        binpath: require('webp-bin').path,\n        preset: 'photo',\n        verbose: true,\n        quality: 80,\n        alphaQuality: 80,\n        compressionMethod: 6,\n        segments: 4,\n        psnr: 42,\n        sns: 50,\n        filterStrength: 40,\n        filterSharpness: 3,\n        simpleFilter: true,\n        partitionLimit: 50,\n        analysisPass: 6,\n        multiThreading: true,\n        lowMemory: false,\n        alphaMethod: 0,\n        alphaFilter: 'best',\n        alphaCleanup: true,\n        noAlpha: false,\n        lossless: false\n      }\n    }\n\n  });\n\n  // load npm task\n  grunt.loadNpmTasks('grunt-webp');\n\n  // register task\n  grunt.registerTask('default', 'webp');\n\n};\n```\n","funding_links":[],"categories":["Uncategorized","Image Optimizers"],"sub_categories":["Uncategorized","Meetups"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomerandomdude%2Fgrunt-webp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsomerandomdude%2Fgrunt-webp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomerandomdude%2Fgrunt-webp/lists"}