π Jekyll plugin for compress/optimize images (jpg, png, gif, svg)
Plugin for compress/optimize images (jpg, png, gif, svg).
add to your Gemfile
:
gem 'jekyll-compress-images'
and in _config.yml
:
plugins:
- jekyll-compress-images
Run bundle install
in your project folder
If you want to setup different path for images, open _config.yml
add
compress_images:
images_path: "yourpath/img/**/*.{gif,png,jpg,jpeg,svg}"
if you donβt configure your default path will be assets/img/**/*.{gif,png,jpg,jpeg,svg}
You can pass image_optim options by using
imageoptim:
pngout: false
svgo: true
verbose: false
on jekyll serve
or in jekyll build
you will run compression, if your images are already compressed, you donβt need to worry because it will not run again which will save bunch of time! π
If this project helps you, you can give me a robot instead of coffee. π
Enjoy π