Did you figure this out? I'm having the same issue.
Skipping files which give "Premature end of JPEG file"
When using gulp-imagemin to minimize thousands of files (16,000).
In this directory there are about a 1000 damaged files that give "Premature end of JPEG file" error.
Is there a way to skip optimization for these files without crashing the task?
Does anyone have a solution ?
LOG:
events.js:160
throw er; // Unhandled 'error' event
^
Error: Premature end of JPEG file
at Promise.all.then.arr (D:\php_workspace\photo_shrink\2f076e49f92998893f1b4004ebf9de6e\node_modules\execa\index.js:202:11)
CODE: gulp.task('default', function(){ return gulp.src([from + '//*.png',from + '//.jpg',from + '//.jpeg',from + '/*/.gif']) .pipe(filelog()) .pipe(imagemin()) .pipe(gulp.dest(to)); });
gulp.start('default');
该提问来源于开源项目:sindresorhus/gulp-imagemin
- 点赞
- 写回答
- 关注问题
- 收藏
- 复制链接分享
- 邀请回答
4条回答
为你推荐
- 在JSP中的<c:forEach items="${list}" var="publish" varStatus="status">想更换数据表publish为book,更换后无法显示,请问各位大神怎么解决该问题?
- javascript
- 1个回答
- ioutil.ReadFile()中出现错误
- 2个回答
- 更改文件的最后一个字符
- json
- 1个回答
- 我真的对导入所需的软件包感到困惑,但是nobuild_files排除了其所有文件
- 1个回答
- (Caused by SSLError(SSLEOFError(8, u'EOF occurred in violation of protocol (_ssl.c:618)'),)) ssl618错误代表什么?
- python
- 2个回答
- PHP帮助“if”语句动态包含文件
- php
- 4个回答
- sscanf() skipping delimiter & width
- 0个回答
- k8s挂载ceph失败,pod状态一直是ContainerCreating
- Rock Skipping
- 1个回答
- 怎么解决RecyclerView 提示No adapter attached;skipping
- android
- 5个回答