JamieMason / ImageOptim-CLI

Make optimisation of images part of your automated build process
https://foldleft.io/image-tools
MIT License
3.45k stars 125 forks source link

imageoptim: cannot execute binary file: Exec format error #186

Closed nlambert closed 3 years ago

nlambert commented 3 years ago

Steps To Reproduce The Error

npm -g install imageoptim-cli imageoptim -h

Expected Behaviour

Should execute :-)

Actual Behaviour

Error executing

Version Numbers or N/A

I'm running an up to date version of arch linux and followed the instructions on npm

Help Needed

I can see at least one other person ran into the issue as per #177

So I tried an earlier version (current is 3.0.2 and tried 2.3.9)

I'm getting the same error, so maybe it's not imageoptim-cli

Any thoughts would be appreciated.

JamieMason commented 3 years ago

Hey @nlambert, I think this will be that the executable wasn't built with linux as a target (nexe build target options here) but, ImageOptim, ImageAlpha, and, JPEGmini are all Mac Apps. imageoptim-cli automates those Apps, so even with this fixed imageoptim-cli wouldn't be suitable for you unfortunately Neil because those Apps aren't available on Linux (as far as I know).

JamieMason commented 3 years ago

(https://github.com/imagemin/imagemin-cli is a really good alternative)

nlambert commented 3 years ago

Ah, got it!

ImageOptim does such a great job! Pity :-)

Thanks for the suggestion, I'll have a look. There are soooo many ways to go... down the rabbit hole I go!

I've tested mozjpeg with good results and have just learned about a whole bunch of other formats that I was completely clueless about (webp, jpeg2000...).

Looks like webp with jpg/png fallback is a good way to go.

Thanks again, @JamieMason

JamieMason commented 3 years ago

You're welcome 👍