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

zero byte files when using mozjpeg #9

Closed
lubomski opened this issue Apr 12, 2016 · 8 comments
Closed

zero byte files when using mozjpeg #9

lubomski opened this issue Apr 12, 2016 · 8 comments

Comments

@lubomski
Copy link

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.

@shinnn
Copy link
Contributor

shinnn commented Apr 12, 2016

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

@lubomski
Copy link
Author

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

@shinnn
Copy link
Contributor

shinnn commented Apr 12, 2016

Then run this command in your Terminal.app.

nasm -v

That should display "NASM version 2.12.01".

@lubomski
Copy link
Author

nasm version 2.11.08

@shinnn
Copy link
Contributor

shinnn commented Apr 12, 2016

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

Upgrade nasm binary and reinstall imagemin-mozjpeg.

@shinnn shinnn closed this as completed Apr 12, 2016
@lubomski
Copy link
Author

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...

@lubomski
Copy link
Author

@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...?

@shinnn
Copy link
Contributor

shinnn commented Apr 12, 2016

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

Good bye.

@imagemin imagemin locked and limited conversation to collaborators Apr 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants