Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traversing directories? #9

Closed
anthonybruno opened this issue Nov 13, 2014 · 2 comments
Closed

Traversing directories? #9

anthonybruno opened this issue Nov 13, 2014 · 2 comments

Comments

@anthonybruno
Copy link

I'm attempting to generate various webp graphics that are within multiple folders as such:

images
- foo
-- image.jpg
- bar
-- another-image.jpg

I've attempted various gulp wildcards for the src such as:

gulp.task('webp', function () {
    return gulp.src('app/images/**/*')
        .pipe(webp())
        .pipe(gulp.dest('dist/images'));
});

and the following error I receive from terminal.app is:

[16:38:40] Starting 'webp'...

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: Command failed: Error! Could not process file /var/folders/00/1snt0000h01000cxqpysvccm0076q8/T/be10a616-a515-4f9b-941a-fb9c2df9a769
Error! Cannot read input picture file '/var/folders/00/1snt0000h01000cxqpysvccm0076q8/T/be10a616-a515-4f9b-941a-fb9c2df9a769'

    at ChildProcess.exithandler (child_process.js:647:15)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:753:16)
    at Socket.<anonymous> (child_process.js:966:11)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Pipe.close (net.js:465:12)

Is it possible to maintain my folder structure?

@sindresorhus
Copy link
Owner

Are you using the latest version of this plugin? Kinda looks like you're trying to pass it a non-image. Try using gulp-debug to see which file it fails on.

@anthonybruno
Copy link
Author

Looks like I had a unknown mp4 file within my directory which was causing the error.

Thanks for the speedy response! Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants