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

Can't get any image processed #1

Closed
jzp74 opened this issue Sep 19, 2015 · 5 comments
Closed

Can't get any image processed #1

jzp74 opened this issue Sep 19, 2015 · 5 comments

Comments

@jzp74
Copy link

jzp74 commented Sep 19, 2015

I have a directory "images" containing the following files:

bg-klaprozen-1.jpg
bg-terras-1.jpg

I created this task in my gruntfile.js

gulp.task('respo', function () {
return gulp.src('images/**/*')
    .pipe(responsive({
        '*bg-*-{1,2,3,4}.jpg': [
            { width: 1600, suffix: '-w1600' }
        ]
        }))
    .pipe(gulp.dest('dist/images'));
});

Unfortunately this doesn't create any image in dis/images. Tried the following substitutions for "bg--{1,2,3,4}.jpg"

  • bg-*-{1,2,3,4}.jpg
  • *.jpg
  • bg-klaprozen-1.jpg

None of them yields any image. Am I doing something wrong or is this a bug?

@dcgauld
Copy link
Owner

dcgauld commented Sep 21, 2015

Hmm, I can't seem to reproduce this, and it doesn't look like you're doing anything wrong. Can you try using * as the pattern and see if that gives you a result?

Also, are there any errors within the console when you run this?

@jzp74
Copy link
Author

jzp74 commented Sep 21, 2015

Thanks for your answer. Tried it but same result. No errors in console.

I tried adding

.pipe(using())

before the responsive command. This yields a full list of the files in the images directory which is correct.

If I add after the responsive command (and before the dest command) it yields nothing (but should have yielded all files). This indicates that the problem is somewhere in the responsive command.

@jzp74
Copy link
Author

jzp74 commented Sep 21, 2015

Just now stripped my gulpfile.js to the bare minimum to test this plugin and to make sure no other code interferes. No change.

This is now my complete file:

var gulp = require('gulp'),
    responsive = require('gulp-responsive-images');
    using = require('gulp-using');

gulp.task('respo', function () {
    return gulp.src('images/**/*')
        .pipe(responsive({
            '*': [
                { width: 1600, suffix: '-w1600' }
            ]
            }))
        .pipe(using())
        .pipe(gulp.dest('dist/images'));
});

gulp.task('default', function() {
    gulp.start('respo');
});

Moving or removing pipe(using()) has no impact on outcome.

What can I test to help solve this bug?

@dcgauld
Copy link
Owner

dcgauld commented Oct 7, 2015

Did you ever get this sorted out?

A colleague had a similar problem last week and it was down to him not having GraphicsMagick installed (as detailed in the README).

@jzp74
Copy link
Author

jzp74 commented Oct 8, 2015

I sort of stopped trying and wrote a bash script instead. Works for me :-)

@dcgauld dcgauld closed this as completed Oct 8, 2015
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