Open OlgaBurtyka opened 8 years ago
How is image_optim
integrated in magento CMS?
I would try to create a file .image_optim.yml
(note the first dot) in the root of the project. Another option is to set config for user by putting config in ~/.config/image_optim.yml
(check that environment variable XDG_CONFIG_HOME
is not set by running echo $XDG_CONFIG_HOME
).
I had to create mine manually as well. myapp/.image_optim.yml
.
Hi! Please, explain me where i can find or create image_optim.yml(I never can find it)?
After installed i find usr/local/bin/image_optim there was this content " require 'rubygems'
version = ">= 0"
if ARGV.first str = ARGV.first str = str.dup.force_encoding("BINARY") if str.respond_to? :forceencoding if str =~ /\A(.*)_\z/ version = $1 ARGV.shift end end
gem 'image_optim', version load Gem.bin_path('image_optim', 'image_optim', version) "
But i need add image_optim.yml file with this setting:
allow_lossy: true # Small images through lossy compression verbose: false # Verbose output
advpng: level: 4 # Compression level: 0 - don't compress, 1 - fast,
2 - normal, 3 - extra, 4 - extreme
gifsicle: level: 3 # Compression level: 1 - light and fast, 2 - normal,
3 - heavy (slower)
careful: false # Avoid bugs with some software
jpegoptim: max_quality: 70 # Maximum image quality factor 0..100, ignored if
allow_lossy is false
jpegrecompress: quality: 1 # JPEG quality preset: 0 - low, 1 - medium, 2 - high,
3 - veryhigh
optipng: level: 7 # Optimization level preset: 0 - least, 7 - best
pngquant: quality: !ruby/range 50..75 # Quality min..max - don't save below min,
use less colors below max
speed: 1 # Speed/quality trade-off: 1 - slow, 3 - default,
11 - fast & rough
pngout: false svgo: false
I used magento CMS and Ubuntu. Please say me where need place image_optim.yml file, how setup and apply canges from image_optim.yml? Thanks