![]() ![]() To use jpegoptim you must npm install jpegoptim-bin -save, this library does not work properly on some OS and platforms. To use guetzli you must npm install guetzli -save, this library does not work properly on some OS and platforms.įor jpegRecompress - in details jpegRecompress įor jpegoptim. Can be false or commands array.įor jpegtran - in details jpegtran įor mozjpeg - in details mozjpeg įor guetzli - (Very long compresses on Win 8.1 google/guetzli#238) in details guetzli command (type:boolean|array): Options for compression.Jpegtran, mozjpeg, webp, guetzli, jpegRecompress, jpegoptim, tinify engine (type:string): Engine for compressing jpeg.Also you can set false Įnginejpg (type:plainObject): Engine for compressing jpeg and options compress. ![]() Globoption (type:boolean|other): Options module`s glob. You can specify the path to source images folder and all images in the folder will be compressed and moved to output folder.Ĭonst compress_images = require ( 'compress-images' ) // We will be compressing images with two algorithms, and // -to-> compress_images ( "src/img/**/*. As an example: you want to compress images in jpegRecompress, but you get the error Unsupported color conversion request, so an alternative algorithm to compress the images can be used, like mozjpeg. If you get an error, alternative algorithms for compressing images can be used. Alternative configuration/algorithm for compressing images If you get an error, the error log will be saved. As an example - mozjpeg + jpegoptim or jpegtran + mozjpeg or any other algorithm. You can even minify images by using a combination of compression algorithms. For PNG: pngquant, optipng, pngout, webp, pngcrush, tinify.For JPG: jpegtran, mozjpeg, webp, guetzli, jpegRecompress, jpegoptim, tinify.You can use different algorithms and methods for compressing images with many options. Image compression with extension: jpg/jpeg, svg, png, gif. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |