imagemin / imagemin-mozjpeg

Imagemin plugin for mozjpeg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zero byte files when using mozjpeg

lubomski opened this issue · comments

Seem to be experiencing an earlier reported issue with mozjpeg zero-byting files... using grunt-contrib-imagemin 1.0.0 and imagemin-mozjpeg 5.1.0

When installing I get the error /temp/node_modules/mozjpeg/vendor/cjpeg` binary doesn't seem to work correctly. Compiling from source reports it builds successfully.

Have swapped to jpegoptim in gruntfile and works as intended, however compression is nowhere as good as mozjpeg.

More info needed. (OS, OS version, Node version, npm version, the URL of "an earlier reported issue" ...)

thanks for the prompt response; setup as follows:
OSX 10.11.4
Node 5.10.0
npm 3.8.3

Then run this command in your Terminal.app.

nasm -v

That should display "NASM version 2.12.01".

nasm version 2.11.08

So, this is not an issue with this plugin but with mozjpeg itself. See mozilla/mozjpeg#175.

Upgrade nasm binary and reinstall imagemin-mozjpeg.

i've tried the aforementioned fix; nasm is now latest build. Still getting zero byte files.

Taken a zip of mozjpeg and compiled it; similar output (zero byte) is happening. Going to switch to a different platform and see if I can reproduce it there.

EDIT: vanilla Win 10 virtual machine; installed node & Grunt; mozjpeg worked out of the box...

@shinnn Further investigation seems to show that switching the imagemin-mozjpeg version in my package.json to 5.0.0 and lower work; when updating to 5.1.0 it breaks. Short term fix is to roll back the version; given that i'm on a Mac Pro and someone else has had a similar issue compiling the binary for mozjpeg on a Mac Pro, I'm going to guess there is some form of very specific architecture issue here...?

@lubomski I'm really sad that you actually don't read my comments.

Good bye.