GithubHelp home page GithubHelp logo

Task silently fails about gulp-image HOT 11 CLOSED

jhulst avatar jhulst commented on June 9, 2024 1
Task silently fails

from gulp-image.

Comments (11)

GJ2511 avatar GJ2511 commented on June 9, 2024

@jhulst

I am facing the same problem but only in Window and Mac Env.
I think task fails when we have some recursive folders ......

Do you also have recursive folders structure??

from gulp-image.

jhulst avatar jhulst commented on June 9, 2024

@GJ2511 By recursive folders do you mean nested folders? If so, yes, my project has nested folders. This is failing on my Mac, haven't tried it on any other platforms.

from gulp-image.

GJ2511 avatar GJ2511 commented on June 9, 2024

@jhulst yes, exactly

from gulp-image.

MohammedAmine avatar MohammedAmine commented on June 9, 2024

I have the same problem. It doesn't process nested folders. Windows 10 env.

from gulp-image.

vladimirlukyanov avatar vladimirlukyanov commented on June 9, 2024

Same problem – author not replying ...

from gulp-image.

1000ch avatar 1000ch commented on June 9, 2024

Confirm that your setting choose images with gulp.src() which accepts string as glob.

const gulp = require('gulp');
const debug = require('gulp-debug');

gulp.task('image', () => {
  gulp.src([your setting])
    .pipe(debug());
});

from gulp-image.

vladimirlukyanov avatar vladimirlukyanov commented on June 9, 2024

@1000ch, thanks for reply
I'm using following config:

const gulp = require('gulp');
const image = require('gulp-image');
const debug = require('gulp-debug');
gulp.task('image', () => {
  gulp.src('/var/www/localhost/wp-content/uploads/**.*')
    .pipe(image())
    .pipe(gulp.dest('./dest'));
});
gulp.task('default', ['image']);`

from gulp-image.

1000ch avatar 1000ch commented on June 9, 2024

Try changing gulp.src('/var/www/localhost/wp-content/uploads/**.*') to gulp.src('/var/www/localhost/wp-content/uploads/**/*.{png,gif,jpg,svg}') ?

from gulp-image.

chicagoing avatar chicagoing commented on June 9, 2024

I had the same issue and added gulp-plumber to troubleshoot.

From zopfli, this was the error I was getting:
google/zopfli#32

Is zopflipng-bin outdated? imagemin/zopflipng-bin#6

But I had issues with mozjpeg and jpegoptim:

Message:
    Command failed: /Users/emadison/Projects/website-3/node_modules/mozjpeg/vendor/cjpeg -optimize -progressive
dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
  Referenced from: /Users/emadison/Projects/website-3/node_modules/mozjpeg/vendor/cjpeg
  Reason: image not found

Details:
    code: null
    killed: false
    stdout:
    stderr: dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
  Referenced from: /Users/emadison/Projects/website-3/node_modules/mozjpeg/vendor/cjpeg
  Reason: image not found
Message:
    Command failed: /Users/emadison/Projects/website-3/node_modules/jpegoptim-bin/vendor/jpegoptim --strip-all --strip-iptc --strip-icc --stdin --stdout
dyld: Library not loaded: /usr/local/lib/libjpeg.8.dylib
  Referenced from: /Users/emadison/Projects/website-3/node_modules/jpegoptim-bin/vendor/jpegoptim
  Reason: image not found

Details:
    code: null
    killed: false
    stdout:
    stderr: dyld: Library not loaded: /usr/local/lib/libjpeg.8.dylib
  Referenced from: /Users/emadison/Projects/website-3/node_modules/jpegoptim-bin/vendor/jpegoptim
  Reason: image not found

Only pngquant and jpegRecompress work for me. Will investigate further. I don't necessarily think it's a problem with gulp-image, but perhaps requires some extra setup for some of the libraries.

from gulp-image.

1000ch avatar 1000ch commented on June 9, 2024

jpegoptim installation required by gulp-image seems to be failed. Would you try to re-install jpegoptim-bin after installing correct version libjpeg-turbo instructed on jpegoptim's readme?

REQUIREMENTS
Independent JPEG Group's jpeg library (libjpeg) version 6b or later.
(Alternatively should also work with libjpeg-turbo or mozjpeg)

from gulp-image.

1000ch avatar 1000ch commented on June 9, 2024

Move to #30

from gulp-image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.