Resources optimizations

Oleh Zasadnyy edited this page Feb 22, 2015 · 5 revisions


####For Windows You can optimize images by running all_image_optimization.bat from \automation\images\ folder

all_image_optimization.bat -d -jtran -pout -pquant -optip -gsicle -svgo


For -svgo intall Nodejs and then run command

[sudo] npm install -g svgo

You can use some of parameters. For example

all_image_optimization.bat -d -jtran -optip

Moreover, you can run the files separately jpegtran.bat, pngout.bat, optipng.bat, pngquant.bat, gifsicle.bat or svgo.bat which by default will optimize all images in /img/ folder and subfolder or pass a path to the folder.



jpegtran.bat D:\development\web\zeppelin\images

####For MacOS and Linux

  • Mac OS users available amazing tool - imageoptim. Thanks @raphaelsavina for link.

  • The other option is this command line utility which is based on and can be used in Linux and MacOS. I can be installed like this:

gem install image_optim

More information about installation and usage can be found on its website: It uses almost the same utilities for the mentioned ones for Windows.

Minify CSS and JS

1. Optimize CSS and JS separately

You can also run the files separately minify_css.bat ( or minify_js.bat ( You can use some of them.

For Windows:

minify_css.bat D:\development\web\zeppelin\styles

For Linux or MacOS:

./ ../../css

Note: When the folder is not specified, the default css and js folders will be used.

2. Only minify default CSS and JS files.

Also you can generate .min files only of main.css and scripts.js

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.