This gem provides an ugly, but working solution for converting uploads to the WebP format.
I created it as an expirement, so gem's API can change in the future. I you're warned!
Just add this line to your application's Gemfile:
Here is an example of usage:
# This is some basic image uploader class ImageUploader < ::CarrierWave::Uploader::Base include CarrierWave::MiniMagick include CarrierWave::WebP::Converter version :show do process resize_to_fill: [100, 100] process convert: :png process :convert_to_webp # Add this to enable WebP Conversion end end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request