jekyll-webp icon indicating copy to clipboard operation
jekyll-webp copied to clipboard

Extended the library with new features

Open Rohithzr opened this issue 2 years ago • 0 comments

For my own use I have extended the library with a few useful scenarios. I am not sure of the author of the original repo would want to extend the repo itself because it kind of goes beyond the purview of the library itself. But I am still happy to contribute and assist.

For anyone curious to try the extended version, below are the details.

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

Sample config

webp:
  enabled: true
  quality: 100
  thumbs: true
  img_dir: ["/blog_images"]
  output_img_sub_dir: "/optimized"
  thumbs_dir: "/thumbnails"
  formats: [".jpeg", ".jpg", ".png", ".tiff"]
  regenerate: true
  generate_50p: true

Happy to hear back from you. :)

Rohithzr avatar Jul 19 '23 16:07 Rohithzr