0.05
No release in over 3 years
Low commit activity in last 3 years
CarrierWave module for processing your uploads into WebP format
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0

Runtime

~> 0.2.0
 Project Readme

Carrierwave::WebP

experimental

Gem Version Code Climate Dependency Status Still Maintained

Coderwall

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. You've been warned!

Installation

Just add this line to your application's Gemfile:

gem 'carrierwave-webp'

Usage

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

You can pass options to webp_ffi:

process convert_to_webp: [{ quality: 60, method: 6 }]

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request