Now you can see the tasks in task tree:
Double click to execute the task.
Configuration
You can add the following options to custom the task:
optimizerOptions {
triggerSize 5
type "lossy"
suffix "_opt"
}
triggerSize Used for filtering pictures. Picture whose size is less than this option will be ignored. Defaults to 0.
type Now supports"lossy" and "lossless"。"lossy" means extreme compression(recommend, default, fast, effective),"lossless" means loseless compression(slow, inefficient)。
suffix The suffix of the picture which has been optimized. If "_opt",the optimizer will generate a new picture orignal_opt.png for original.png. Defaults to null.
Preview
Original png
Extreme compression(lossy)
Loseless compression(lossless)
526K
195K(reduce 63%)
473K(reduce 10%)
Note
If there are multiple modules in your project, please add the optimizer in where you want to execute optimization since each module is independent. The optimizer will generate log file in the root directory of current module.
请发表评论