You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using gulp-webp to optimize images in a .net MVC 5.2.7 project.
gulpfile.js:
var gulp = require('gulp');
var gulpSass = require('gulp-sass');
var csso = require('gulp-csso');
var webp = require('gulp-webp');
gulpSass.complier = require('dart-sass');
gulp.task('compile-sass', function () {
return gulp.src('./src/custom.scss')
.pipe(gulpSass()).pipe(csso()).pipe(gulp.dest('./Content'));
});
//This task will create *.webp compressed images from the jpgs and pngs in the images folder.
gulp.task('convert-webp', function () {
return gulp.src('images/*/*.{jpg,png}')
.pipe(webp({ quality: 50 }))
.pipe(gulp.dest('images', { overwrite: true }))
});
On my first run of task 'convert-webp':
[06:53:47] Using gulpfile ~\source\Workspaces\xxx\xxx\Gulpfile.js
[06:53:47] Starting 'convert-webp'...
[06:53:58] Finished 'convert-webp' after 11 s
Process terminated with code 0.
On any subsequent run of task 'convert-webp':
[07:00:28] Using gulpfile ~\source\Workspaces\xxx\xxx\Gulpfile.js
[07:00:28] Starting 'convert-webp'...
[07:00:29] 'convert-webp' errored after 606 ms
[07:00:29] Error: EPERM: operation not permitted, open C:\Users\jclark\source\Workspaces\xxx\xxx\images\logo\logo1.webp'
All the permission's are correct. If I delete *.webp, the task completes with terminated return code 0.
Can I get some direction to a solution?
The text was updated successfully, but these errors were encountered:
function defaultTask() {
return SRC('imgs/**/*.{png,jpg}').pipe(WEBP()).pipe(DEST('output/imgs'))
}
exports.default = defaultTask;
my error
[17:58:20] Using gulpfile E:\iyouTest\gulp\gulpfile.js
[17:58:20] Starting 'default'...
[17:58:20] 'default' errored after 125 ms
[17:58:20] Error in plugin "gulp-webp"
Message:
ϵͳ�Ҳ���ָ����·����
I'm using gulp-webp to optimize images in a .net MVC 5.2.7 project.
gulpfile.js:
On my first run of task 'convert-webp':
Can I get some direction to a solution?
The text was updated successfully, but these errors were encountered: