Skip to content

pintawebware/gulp-squeezeimg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

squeezeimg gulp

The Gulp Squeezeimg plugin is destined to optimize unlimited images without any visible loss in quality.

Using the plugin Gulp Squeezeimg you can easily minify the size of all your images, speed up loading of your websites and applications.

You can compress your images of such formats - .png, .jpg/.jpeg, .gif, .svg, .bmp, .tiff.

Also plugin allows you to convert your images to webP and jp2 format.

Try the plugin functions right now. To do this, go to https://squeezeimg.com/.

Install

$ npm install --save-dev @pintawebware/gulp-squeezeimg

Usage

gulpfile.js

var squeezeimg = require('@pintawebware/gulp-squeezeimg');

const option = {
    token: 'Your API token',
    qlt: 60,
    method: 'compress',
    to: 'webp',
    rename: false,
  }

gulp.task('gulp-squeezeimg', function() {
  return gulp.src('images/*') 
    .pipe(squeezeimg(option))
    .pipe(gulp.dest('dist/'));
});

gulp.task('default', gulp.series('gulp-squeezeimg'));

API

squeezeimg(option)

Options Object

token :

'Your API token', https://squeezeimg.com/account/api or https://squeezeimg.com-> My account-> Api

qlt :

Quality precentage (max 80), default 60

method :

'convert or compress', default 'compress'

to

convert to format ( jp2, webp, avif ) default 'webp'

rename

rename image, default false ( If true, the file name is assigned by the server )

License MIT License (c) PintaWebware

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •