Closed davidosomething closed 10 years ago
Only JPEG images? Do you have jpegtran installed globally (which jpegtran
)?
Ok, think I found the problem. Looks like it's mkdirp
.
The issue here. Ubuntu 13.10, PNG and JPG files: https://dl.dropboxusercontent.com/u/47486136/screenshots/imagemin.png
@primozcigler, reinstall. Issue should be fixed.
Closing -- comment here if it's still a problem after reinstalling and it can be revisited.
Removed 0.6.0, installed 0.6.1, the problem with JPGs is solved, the PNGs are still the same. In the CLI says everything is OK, but the pngs are still 0 bytes.
Also getting 0 byte PNGs but good JPGs with 0.6.1. The problem happens on our codeship.io builds using Ubuntu 12.10 but works OK on my local Ubuntu 13.04 in a VM on a Windows machine.
@kevva I think we must ignore the global installations of image optimizers. Seems like Ubuntu 12.10 might have some old version of the optimizer that is really broken?
@vladikoff, maybe we could check version?
Using 0.6.1 and didn't solve the issue, still getting jpegs 0 bytes. Im on windows 7 x64. Tried updating jpegtran to the latest version but still no luck.
Had to switch back to version 0.5.0 to make it work.
Same issue occurs here in both 0.6 and 0.6.1 with OSX 10.9.2
+1, I have the same problem。 osx 10.8.4
Will fix soon.
Just to add my experience:
On Mint 16 (Ubuntu 13.10) using version 0.6.1 and was getting zero length png's (jpg's were fine). optipng version was 0.6.4 (from Ubuntu repos) Downloaded, compiled and installed latest optipng (0.7.4) - http://kb.imakewebsites.ca/2012/10/16/installing-optipng-0-7-3-on-ubuntu-12-04/
Working again :)
Still broken for me as well (OSX 10.9.2 & imagemin 0.6.1) on both JPG and PNG files. Is there an interim workaround that anyone has found and can share?
Try the latest version from GitHub, use
npm cache clean
and then npm install gruntjs/grunt-contrib-imagemin
. Let us know how it goes!
That seems to be OK now.
Doesn't work for me yet. It is better (no more 0-bytes files), but still problems ...
Gruntfile:
imagemin: {
options: {
progressive: false,
},
build: {
files: [{
expand: true,
cwd: 'src/images',
src: ['**/*.{png,gif,jpg,jpeg}'],
dest: 'build/images'
}]
}
},
CLI:
Running "imagemin:build" (imagemin) task
✔ src/images/420-slider/slider-image-2.jpg (already optimized)
✔ src/images/420-slider/slider-image-4.jpg (already optimized)
✔ src/images/420-slider/slider-image-3.jpg (already optimized)
✔ src/images/dummy-licensed/about-us-image.jpg (already optimized)
✔ src/images/dummy-licensed/blog-image-3-small.jpg (saved 177 B - 2%)
✔ src/images/dummy-licensed/blog-image-2.jpg (already optimized)
✔ src/images/420-slider/slider-image-1.jpg (already optimized)
✔ src/images/dummy-licensed/blog-image-small.jpg (already optimized)
✔ src/images/dummy/about-1.jpg (already optimized)
✔ src/images/dummy/about-2.jpg (already optimized)
✔ src/images/dummy-licensed/blog-image-3.jpg (already optimized)
✔ src/images/dummy/about-3.jpg (already optimized)
✔ src/images/dummy/about-4.jpg (saved 66 B - 2%)
✔ src/images/dummy-licensed/blog-image.jpg (already optimized)
✔ src/images/dummy/about-5.jpg (already optimized)
✔ src/images/dummy/about-6.jpg (already optimized)
✔ src/images/dummy/ads-160x600.jpg (saved 26 B - 1%)
✔ src/images/dummy/ads-300x250.jpg (saved 917 B - 16%)
Warning: Command failed: ** Error: Lossy operations are not currently supported
Use --force to continue.
Aborted due to warnings.
@primozcigler, #180. Update OptiPNG.
Phew!
Working now, tnx!
Installing this worked for me.
https://github.com/yeoman/node-optipng-bin#node-optipng-bin-
ok thx ^_^
------------------ 原始邮件 ------------------ 发件人: "Marc Cometa"; 发送时间: 2014年5月2日(星期五) 上午10:56 收件人: "gruntjs/grunt-contrib-imagemin"; 抄送: "David"; 主题: Re: [grunt-contrib-imagemin] 0.6 jpeg compresses to 0 bytes (#187)
Installing this solved my problem.
https://github.com/yeoman/node-optipng-bin#node-optipng-bin-
— Reply to this email directly or view it on GitHub.
https://www.dropbox.com/s/v8u6fipdta5yuyx/bg-fest.jpg
this jpg compresses to zero bytes