Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/valerijaspasojevic/jekyll-compress-images
🚀 Jekyll plugin for compress/optimize images (jpg, png, gif, svg)
https://github.com/valerijaspasojevic/jekyll-compress-images
compress-images images jekyll optimize-images
Last synced: 2 months ago
JSON representation
🚀 Jekyll plugin for compress/optimize images (jpg, png, gif, svg)
- Host: GitHub
- URL: https://github.com/valerijaspasojevic/jekyll-compress-images
- Owner: valerijaspasojevic
- License: mit
- Created: 2017-10-18T15:39:02.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-01T14:50:48.000Z (about 6 years ago)
- Last Synced: 2024-09-29T03:03:59.862Z (3 months ago)
- Topics: compress-images, images, jekyll, optimize-images
- Language: Ruby
- Homepage:
- Size: 18.6 KB
- Stars: 43
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Gem Version](https://badge.fury.io/rb/jekyll-compress-images.svg)](https://badge.fury.io/rb/jekyll-compress-images)
# jekyll-compress-images
Plugin for compress/optimize images (jpg, png, gif, svg).
# Installation
add to your `Gemfile`:
```ruby
gem 'jekyll-compress-images'
```and in `_config.yml`:
```ruby
plugins:
- jekyll-compress-images
```Run `bundle install` in your project folder
# Configuration
If you want to setup different path for images, open `_config.yml` add
```ruby
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}`
## image_optim options
You can pass [image_optim](https://github.com/toy/image_optim) options by using
```ruby
imageoptim:
pngout: false
svgo: true
verbose: false
```# Usage
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. :)
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.me/ValerijaSpasojevic)
**Enjoy** 🎉