https://github.com/hanazuki/middleman-image_optim
Automatic image optimizer for Middleman 4
https://github.com/hanazuki/middleman-image_optim
middleman-extension
Last synced: 5 months ago
JSON representation
Automatic image optimizer for Middleman 4
- Host: GitHub
- URL: https://github.com/hanazuki/middleman-image_optim
- Owner: hanazuki
- License: mit
- Created: 2016-09-30T10:00:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-30T17:41:50.000Z (over 8 years ago)
- Last Synced: 2024-08-31T15:52:07.099Z (9 months ago)
- Topics: middleman-extension
- Language: Ruby
- Homepage:
- Size: 48.8 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Middleman::ImageOptim
Automatic image optimizer for [Middleman](https://middlemanapp.com/) v4 using [image_optim](https://github.com/toy/image_optim) gem.
## Installation
Install [image optimizers supported by image_optim](https://github.com/toy/image_optim#binaries-installation), and then enable `middleman-image_optim` gem in your Middleman project.
```ruby
gem 'middleman-image_optim'
gem 'image_optim_pack' # optional -- some optimizers can be installed with this gem
```## Usage
Activate `image_optim` extension in your Middleman configuration. Refer to the [image_optim documentation](https://github.com/toy/image_optim#options) for available options.
```ruby
configure :build do
activate :image_optim,
cache_dir: File.join(__dir__, '.cache', 'image_optim'),
jpegtran: true,
optipng: true
end
```## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).