Generator-jhipster: Remove pngquant/optipng

Created on 6 Apr 2017  Â·  8Comments  Â·  Source: jhipster/generator-jhipster

I haven't looked very closely at pngquant/optipng but we keep having issues with those:

  • Those are native libraries that do image minification
  • They need to be native (you can't do that kind of thing in JavaScript)
  • They rely on libraries that should be installed on the machine, which make them fail quite often on Linux (and also on Windows, see #5547 )

Apart from those errors, as those are native librairies, they should be downloaded at each project generation (they can't be stored in the Yarn cache), and that's a real pain when generating an application.

I find those are totally useless. Images should be done by graphic designers, and they don't work with PNG or JPEG. So when images are put into the application, they should already be minified, and shouldn't be touched by our minification process.

So I'm opening this ticket to remove those.

Most helpful comment

OK I'm doing it - I'm so fed up with those image issues!

All 8 comments

I wouldn't mind removing image min to reduce complexity. It could be added
as a tip instead

On Thu, 6 Apr 2017, 5:28 pm Julien Dubois, notifications@github.com wrote:

I haven't looked very closing at pngquant/optipng but we keep having
issues with those:

  • Those are native libraries that do image minification
  • They need to be native (you can't do that kind of thing in
    JavaScript)
  • They rely on libraries that should be installed on the machine,
    which make them fail quite often on Linux (and also on Windows, see
    #5547 https://github.com/jhipster/generator-jhipster/issues/5547 )

Apart from those errors, as those are native librairies, they should be
downloaded at each project generation (they can't be stored in the Yarn
cache), and that's a real pain when generating an application.

I find those are totally useless. Images should be done by graphic
designers, and they don't work with PNG or JPEG. So when images are put
into the application, they should already be minified, and shouldn't be
touched by our minification process.

So I'm opening this ticket to remove those.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/5553, or mute the
thread
https://github.com/notifications/unsubscribe-auth/ABDlF9gpz_UmFfSeZue_oWMR64uq2U4tks5rtQSigaJpZM4M1xFn
.

OK I'm doing it - I'm so fed up with those image issues!

+1 @jdubois :)

@jdubois you were faster that me lol

We also should revert https://github.com/jhipster/generator-jhipster/commit/da24c3a7a89064a6f2e99a8bda3b1aee859303bf (it references pngquant and I don't think the phantomjs part is needed)

Oh sorry I missed this one, thanks @ruddell

@ruddell @jdubois the phantomjs part seemed to be needed for me but I can't tell you exactly why yet. I added it back and everything worked. ref: https://github.com/karma-runner/karma-phantomjs-launcher/issues/120#issuecomment-262634703

@sdoxsee I originally added those lines without much reason besides that several people had to run into that same issue, I can't reproduce it anymore though. Also our Travis tests seem to be passing without a problem, so maybe it's related to node version or operating system? If you can reproduce it or have more info on why it happens, please open a new issue with the details

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RizziCR picture RizziCR  Â·  3Comments

DanielFran picture DanielFran  Â·  3Comments

Steven-Garcia picture Steven-Garcia  Â·  3Comments

shivroy121 picture shivroy121  Â·  3Comments

trajakovic picture trajakovic  Â·  4Comments