Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

gulp-imageisux

> 编程语言
Open source

智图gulp插件

378 stars0 likes2 views
WebsiteGitHub

About

智图gulp插件

#gulp-imageisux 智图的gulp插件

##Introduce 这是智图的gulp插件,它能自动压缩图片,并生成对应的webp格式(可选)。 你只需要声明src(path)图片源地址,并执行方法pipe(imageisux())就好了。

##Install 当然,你需要先安装gulp。

javascript
$ npm install --global gulp

然后安装插件。

javascript
//全局安装
$ npm install --global gulp-imageisux

//局部安装
$ npm install --save-dev gulp-imageisux

##Usage 1、声明图片地址,例如放在img目录下面gulp.src(['img/*'])。 2、指定参数,压缩图片导出目录/dest/和是否同时导出webp格式。

javascript
var imageisux = require('gulp-imageisux');

gulp.task('imageisux', function() {
	return gulp.src(['img/*'])
			   .pipe(imageisux('/dirpath/',true));
});

##API 两个参数,dirpath目标目录以及enableWebp是否同时导出对应WEBP格式图片。

  • dirpath: 如果未定义,会自动生成两个目录:'/dest/'目录放压缩后图片,'/webp/'目录放对应的webp格式压缩图片。

  • enableWebp : 若为true,则会同时输出webp图片;若为false,则只会有压缩后原格式图片。

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言