GithubHelp home page GithubHelp logo

Comments (8)

ubenzer avatar ubenzer commented on June 2, 2024

I have the same issue, using node v5.11.0.

from gulp-image.

andrewjmead avatar andrewjmead commented on June 2, 2024

Same issue here. Using 2.0.0 on Node v6.1.0.

from gulp-image.

lucaslim avatar lucaslim commented on June 2, 2024

Error seems to be with jpegoptim.

It's returning error if more than one options is set for jpeg optimization

jpegoptim: error removing file: C:\Users\<User>\AppData\Local\Temp\84dd72bf-abe9-4a5d-b174-ee76d4b3f743\Sam_bike_high_res.jpg
jpegoptim: cannot rename temp file

from gulp-image.

1000ch avatar 1000ch commented on June 2, 2024

Hmm, do you show me your image optimisation task in gulpfile.js?

from gulp-image.

ubenzer avatar ubenzer commented on June 2, 2024
      pipe = pipe.pipe(g.image({
        svgo: {disable: ["convertTransform"]}
      }));

from gulp-image.

elbebass avatar elbebass commented on June 2, 2024

Just ran into this bug

from gulp-image.

ecDusty avatar ecDusty commented on June 2, 2024

Hi Team, I think I found a work around. (I'm also new to contributing so please bare with any small mistakes I might make)

I've been running into the same issue after I installed the updated version of gulp-image v2.0.1. I had previously been using gulp-image v1.3.1 without issue. (Node v4.4.4, npm v3.8.6, Gulp v3.9.1)

When I tried to use gulp-image v2.0.1, it would crash out and not complete. My gulp code read:

var = IMG_PATH = 'src/**/*.{jpeg,png,jpg,gif,svg}';
var DIST_DIR = 'dist'; 

gulp.task('images', function () {
  console.log('>---Starting Images function---<');

  return gulp.src(IMG_PATH)
    .pipe(imgS())
    .pipe(gulp.dest(DIST_DIR));
});

Within my Git Bash console, the program would crash without any reason (See example below)

xxx@xxx-Yoga  /c/GitHub/mobile-portfolio-fend (master)
$ gulp images
[15:29:00] Using gulpfile C:\GitHub\mobile-portfolio-fend\gulpfile.js
[15:29:00] Starting 'images'...
>---Starting Images function---<
[15:29:00] - images\arcade-game.jpg -> Cannot improve upon 5.81 KB

xxx@xxx-Yoga  /c/GitHub/mobile-portfolio-fend (master)
$
  1. Trying to keep as many options set to true:
    It seems that if you disable certain image optimization features that gulp-image wouldn't crash. (Please note that I went through every possible configuration, trying to leave as many options set to true as possible). See my edited code that worked below:
gulp.task('images', function () {
  console.log('>---Starting Images function---<');

  return gulp.src(IMG_PATH)
    .pipe(imgS({
        pngquant: true,
        optipng: true,
        zopflipng: false,
        advpng: false,
        jpegRecompress: false,
        jpegoptim: true,
        mozjpeg: false,
        gifsicle: false,
        svgo: false
      }))
    .pipe(gulp.dest(DIST_DIR));
});
  1. Testing each image optimization separately
    To be vigilant in my testing, I tried setting each image optimization to true 1 at a time (Leaving the rest set to false). It seems that 3 options crash out by themselves:
  • jpegRecompress
  • jpegoptim
  • svgo

I do hope this helps. If you have any questions I'd be happy to help out.

from gulp-image.

1000ch avatar 1000ch commented on June 2, 2024

@tecbeast42 @ubenzer @andrewjmead @lucaslim @elbebass @ecDusty
Sorry for delay, this may be fixed on v2.2.0.

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.