Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

after install image_optim i can't find image_optim.yml file. I need add own config #128

Open
OlgaBurtyka opened this issue Mar 9, 2016 · 2 comments

Comments

@OlgaBurtyka
Copy link

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? :force_encoding
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

@toy
Copy link
Owner

toy commented Mar 10, 2016

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).

@dt1973
Copy link

dt1973 commented Mar 10, 2016

I had to create mine manually as well. myapp/.image_optim.yml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants