# Changes from original
* Forked from **https://github.com/Rohithzr/jekyll-webp-ext (_branch_ extend)**
* Version bump to **1.1.1**
* Updated only **x64** binaries to v1.3.2
* Updated **gemspec**
# WebP Generator for Jekyll (Extended)
WebP Image Generator for Jekyll Sites can automatically generate WebP images for all images on your static site and serve them when possible. View on [rubygems.org](https://rubygems.org/gems/jekyll-webp).
**This repo is an extended version of it's fork [jekyll-webp](https://github.com/sverrirs/jekyll-webp)**
## Additional Features
- Generate thumbnails in webp format
- Generate small images (.5x) in webp format
- Specifiy output sub directory for webp images
## Additional Dependencies
- fastimage
## Installation instructions
```
group :jekyll_plugins do
gem 'jekyll-webp', git: 'https://github.com/Rohithzr/jekyll-webp-ext', branch: 'extend'
end
```
## Original installation instructions
```
gem install jekyll-webp
```
The release includes all necessary files to run, including the WebP redistributable executable files.
> Currently the release includes the v0.6.1 version of the WebP utilities for Windows, Linux and Mac OS X 10.9 (Mountain Lion). Other versions and releases can be downloaded directly from the Google page.
Add the gem to your `Gemfile` and to Jekyll's `_config.yml` then run `jekyll serve` again and you should see the generator run during site generation.
## Configuration
The plugin can be configured in the site's `_config.yml` file by including the `webp` configuration element
``` yml
############################################################
# Site configuration for the WebP Generator Plugin
# The values here represent the defaults if nothing is set
webp:
enabled: true
# The quality of the webp conversion 0 to 100 (where 100 is least lossy)
quality: 75
# List of directories containing images to optimize, nested directories will only be checked if `nested` is true
# By default the generator will search for a folder called `/img` under the site root and process all jpg, png and tiff image files found there.
img_dir: ["/img"]
# Whether to search in nested directories or not
nested: false
# add ".gif" to the format list to generate webp for animated gifs as well
formats: [".jpeg", ".jpg", ".png", ".tiff"]
# File extensions for animated gif files
gifs: [".gif"]
# Set to true to always regenerate existing webp files
regenerate: false
# Local path to the WebP utilities to use (relative or absolute)
# Omit or leave as nil to use the utilities shipped with the gem, override only to use your local install
# Eg : "/usr/local/bin/cwebp"
webp_path: nil
# List of files or directories to exclude
# e.g. custom or hand generated webp conversion files
exclude: []
# append '.webp' to filename after original extension rather than replacing it.
# Default transforms `image.png` to `image.webp`, while changing to true transforms `image.png` to `image.png.webp`
append_ext: false
##### Extended Features start
# Use a different output subdirectory
# e.g. value of "/optimized" will create files at "/source/optimized" instead of "/source"
output_img_sub_dir: "/optimized" # default ""
# Generate thumbnails
thumbs: true
# Thumbnails sub directory
thumbs_dir: "/thumbs"
# generate .5x images
generate_50p: true
##### Extended Features end
############################################################
```
## Simplest use: HTML
In case you don't have control over your webserver then using the `