tcoopman / image-webpack-loader

Image loader module for webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default compression ratio / quality and decision per image

gaurav5430 opened this issue · comments

In the README, i couldn't find what are the default values for the compression for all these plugins?
I can see that the mozjpeg plugin is enabled by default but how much it would compress the files ?

Does it use any hueristics to determine how much every different file should be compressed to?

If i use this in my webpack pipeline, how do i make sure that I do not get pixelated images? Do i need to verify all the newly added images after every build about whether or not they look alright on different screen sizes?

If no custom configuration is being used, the defaults are not changed from the imagemin dependencies. The defaults can be found linked from the README. For example for jpeg this loader uses imagemin-mozjpeg and the defaults for that package are described here: https://github.com/imagemin/imagemin-mozjpeg

Hey,
I don't see any defaults for quality in the README or the linked repo.

Also, can't find any information about the heuristics to determine what should be the quality?
How do we decide what should be the quality/compression? should it be different per file ?