:allow_lossy - Allow quality option (defaults to false).:strategy - Strategy: 0 - xtreme, 1 - intense, 2 - longest Match, 3 - huffman Only, 4 - uncompressed (defaults to 0).:copy_chunks - Copy optional chunks (defaults to false).:blacken - Blacken fully transparent pixels (defaults to true).:brute - Brute force try all methods, very time-consuming and generally not worthwhile (defaults to false).:fix - Fix otherwise fatal conditions such as bad CRCs (defaults to false).:chunks - List of chunks to remove or :alla - all except tRNS/transparency or :allb - all except tRNS and gAMA/gamma (defaults to :alla).:strip - Remove all auxiliary chunks (defaults to true).:interlace - Interlace: true - interlace on, false - interlace off, nil - as is in original image (defaults to false).:level - Optimization level preset: 0 is least, 7 is best (defaults to 6).:jpegrescan - Use jpegtran through jpegrescan, ignore progressive option (defaults to false).:progressive - Create progressive JPEG file (defaults to true).:copy_chunks - Copy all chunks (defaults to false).:quality - JPEG quality preset: 0 - low, 1 - medium, 2 - high, 3 - veryhigh (defaults to 3).:allow_lossy - Allow worker, it is always lossy (defaults to false). 100, ignored in default/lossless mode (defaults to 100) :max_quality - Maximum image quality factor 0.:strip - List of extra markers to strip: :comments, :exif, :iptc, :icc or :all (defaults to :all).:allow_lossy - Allow limiting maximum quality (defaults to false).:careful - Avoid bugs with some software (defaults to false).:level - Compression level: 1 - light and fast, 2 - normal, 3 - heavy (slower) (defaults to 3).:interlace - Interlace: true - interlace on, false - interlace off, nil - as is in original image (defaults to running two instances, one with interlace off and one with on).:level - Compression level: 0 - don't compress, 1 - fast, 2 - normal, 3 - extra, 4 - extreme (defaults to 4).Worker can be disabled by passing false instead of options hash or by setting option :disable to true. :cache_worker_digests - Also cache worker digests along with original file digest and worker options: updating workers invalidates cache.:allow_lossy - Allow lossy workers and optimizations (defaults to false).:skip_missing_workers - Skip workers with missing or problematic binaries (defaults to false).:pack - Require image_optim_pack or disable it, by default image_optim_pack will be used if available, will turn on :skip-missing-workers unless explicitly disabled (defaults to nil).:verbose - Verbose output (defaults to false).:threads - Number of threads or disable (defaults to number of processors).Paths can be changed using :config_paths option and -config-paths argument. image_optim.yml in current working directory $XDG_CONFIG_HOME/image_optim.yml (by default ~/.config/image_optim.yml). ConfigurationĬonfiguration in YAML format will be read and prepended to options from two paths: Image optimization can be time consuming, so depending on your deployment process you may prefer to optimize original asset files. PATH="/Applications/ImageOptim.app/Contents/MacOS:$PATH" image_optim *.jpgĮNV = "/custom/location:#).Ĭheck available options in options section. PATH="/custom/location:$PATH" image_optim *.jpg Specify custom bin location using XXX_BIN environment variable ( JPEGOPTIM_BIN, OPTIPNG_BIN, …).īesides permanently setting environment variables in ~/.profile, ~/.bash_profile, ~/.bashrc, ~/.zshrc, … they can be set: If you cannot install to common location, then install to custom one and add it to PATH. Simplest way for image_optim to locate binaries is to install them in common location present in PATH (see Binaries installation). If you want to check latest changes: gem ' image_optim ', :git => ' git:///toy/image_optim.git ' Binaries location With version: gem ' image_optim ', ' ~> 0.23 ' With image_optim_pack: gem ' image_optim ' gem ' image_optim_pack ' You may also want to install image_optim_pack (see Binaries pack).
0 Comments
Leave a Reply. |