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

What tool is Imgbot using to achieve its results? #985

Open
K0-RR opened this issue Aug 15, 2021 · 7 comments
Open

What tool is Imgbot using to achieve its results? #985

K0-RR opened this issue Aug 15, 2021 · 7 comments

Comments

@K0-RR
Copy link

K0-RR commented Aug 15, 2021

Is it optipng, imagemagick or sth else?

@dlemstra
Copy link
Collaborator

It is Magick.NET (https://github.com/dlemstra/Magick.NET) that has it's own code and some ImageMagick code to optimize the files.

@K0-RR
Copy link
Author

K0-RR commented Aug 16, 2021

I have no experience with ImageMagick or your .NET library but I have some with Oxipng and it seems to always be better than Imgbot. I can tell you more about this tool and link some PRs - Imgbot ones and mine with Oxipng for the same files so you can compare.

If you are not interested / don't see a way to make use of this tool in Imgbot then just close this issue.

@dlemstra
Copy link
Collaborator

For PNG compression it might be a good idea to search for an alternative. Feel free to research this.

@K0-RR
Copy link
Author

K0-RR commented Sep 9, 2021

I did some tests and then forgot about this. A few days ago I discovered another tool - https://github.com/JayXon/Leanify and it seems to outperform anything else.
Running more tests and will post results later.

The problem is - leanify optimizes many formats but there is no option to exclude some of them so if it sees JSON or xml files it makes them hard to read - minified.
Screenshot from 2021-09-03 17-08-23

Unless someone PRs a "fix" to Leanify the only way to use it for image-only optimization is to make a copy of the repo first, run leanify on the copy, and then move all image files to the original directory. This can be easily done with a bash script.

@jbmagination
Copy link

It's been a month, and I'm interested in this! How are the tests coming?

@GrigoreMihai
Copy link
Contributor

GrigoreMihai commented Oct 26, 2021

Is there any progress for this issue or any code where you tried to integrate leanify into our optimization that we can look at ? I think a good way to implement and test other optimizer will be following the hints from here: #467 which are already implemented. ie. you need to create another compressor that extends the ICompress interface. Let us know what you think, if there is a way we can integrate the suggested optimizer ( leanify ) or we should close the issue ? Also here is an example of how to add an optimizer: #654

@cooljeanius
Copy link

The ImageOptim app has a wide range of tools to investigate possibly using: https://imageoptim.com/mac
Specifically, it uses all of:

  • oxipng
  • pngcrush
  • mozjpeg
  • zopfli
  • advpng
  • jpegoptim
  • gifsicle
  • svgo
  • svgcleaner
  • pngout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants