{"id":23666586,"url":"https://github.com/redsift/gulp-compressedimages","last_synced_at":"2025-12-11T06:30:15.443Z","repository":{"id":65599431,"uuid":"65061094","full_name":"redsift/gulp-compressedimages","owner":"redsift","description":null,"archived":false,"fork":false,"pushed_at":"2016-08-08T14:54:51.000Z","size":323,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-02-11T09:47:22.438Z","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/redsift.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-06T02:29:29.000Z","updated_at":"2016-08-06T02:29:36.000Z","dependencies_parsed_at":"2023-01-31T06:45:14.707Z","dependency_job_id":null,"html_url":"https://github.com/redsift/gulp-compressedimages","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/redsift%2Fgulp-compressedimages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsift%2Fgulp-compressedimages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsift%2Fgulp-compressedimages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsift%2Fgulp-compressedimages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redsift","download_url":"https://codeload.github.com/redsift/gulp-compressedimages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239674879,"owners_count":19678487,"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-12-29T07:33:11.799Z","updated_at":"2025-12-11T06:30:15.391Z","avatar_url":"https://github.com/redsift.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-compressedimages\n\n[![Circle CI](https://img.shields.io/circleci/project/redsift/gulp-compressedimages.svg?style=flat-square)](https://circleci.com/gh/redsift/gulp-compressedimages)\n[![npm](https://img.shields.io/npm/v/@redsift/gulp-compressedimages.svg?style=flat-square)](https://www.npmjs.com/package/@redsift/gulp-compressedimages)\n[![MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://raw.githubusercontent.com/redsift/gulp-compressedimages/master/LICENSE)\n\nProcesses images with ImageMagick to resize and compress them carefully as JPEG or WEBP files.\n\n## Installation\n\n`gulp-compressedimages` requires ImageMagick (tested with ImageMagick 6.9.2) compiled with the jpeg, lcms and webp delegates.\n\nVerify this via `convert -version`. If you receive a `Stream yields empty buffer` error while reading or writing WEBP, most likely your ImageMagick binary was not built with WEBP support.\n\nRunning the pipe will also typically require an sRGB ICC profile [downloaded locally](http://www.color.org/srgbprofiles.xalter) to correctly perform the color conversion.\n\n## Usage\n\n`require('gulp-compressedimages').resampler` can be used in the gulp stream to process images.\n\n```js\n// Multiple files to an auto compressed JPEG\nvar gulp = require('gulp'),\n    photos = require('@redsift/gulp-compressedimages');\n\ngulp.task('images', function() {\n    return gulp.src([ 'photo1.jpg', ... ])\n        .pipe(photos.resampler({ size: 200 }))\n        .pipe(gulp.dest('dist/'));\n});\n```\n\n```js\n// Multiple files to a heavily compressed WebP\nvar gulp = require('gulp'),\n    photos = require('@redsift/gulp-compressedimages');\n\ngulp.task('images', function() {\n    return gulp.src([ 'photo1.jpg', ... ])\n        .pipe(photos.resampler({ size: 200, webp: true, quality: 50 }))\n        .pipe(gulp.dest('dist/'));\n});\n```\n\n## Usage - Standard Sizes\n\n`require('gulp-compressedimages').common` provides a list of standard sizes to generate asset files for common use.\n\nThe common sizes also have small amounts of sharpening built into the pipeline and are best served by processing original assets at original (\u003e 3000 pixels) resolutions.\n\n```js\nvar gulp = require('gulp'),\n    photos = require('@redsift/gulp-compressedimages'),\n    merge = require('merge-stream');\n\ngulp.task('common', function() {\n    var all = photos.common.map(function (o) {\n        return gulp.src('photo.jpg')\n            .pipe(photos.resampler(o))\n            .pipe(gulp.dest('dist/'));\n    });\n\n    return merge.apply(this, all);\n});\n```\n\n## Stripping\n\nThis plugin strips color profiles and comments to reduce image size.\n\n## Colorspace conversion\n\nAs a result of stripping profiles, the image needs to be converted to sRGB. If required, the plugin with change the colorspace with a Perceptual intent.\n\n## Gamma correct scaling\n\nThe scaling operations are done in a linear manner to avoid scaling errors. Reference [this article](http://www.4p8.com/eric.brasseur/gamma.html) for the issues addressed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredsift%2Fgulp-compressedimages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredsift%2Fgulp-compressedimages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredsift%2Fgulp-compressedimages/lists"}