Sha256: 61fcacc0b9911c7b1564b4b75f1714dcb2bb1c049b398dd9ab374a6f7f4fbe0b

Contents?: true

Size: 305 Bytes

Versions: 62

Compression:

Stored size: 305 Bytes

Contents

module Workarea
  module ImageOptimProcessor
    def self.call(content)
      if optimized = image_optim.optimize_image(content.path).presence
        content.update(optimized)
      end
    end

    def self.image_optim
      ImageOptim.new(Rails.application.config.assets.image_optim)
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 lib/workarea/image_optim_processor.rb
workarea-core-3.5.26 lib/workarea/image_optim_processor.rb
workarea-core-3.4.45 lib/workarea/image_optim_processor.rb
workarea-core-3.5.25 lib/workarea/image_optim_processor.rb
workarea-core-3.5.23 lib/workarea/image_optim_processor.rb
workarea-core-3.4.44 lib/workarea/image_optim_processor.rb
workarea-core-3.5.22 lib/workarea/image_optim_processor.rb
workarea-core-3.4.43 lib/workarea/image_optim_processor.rb
workarea-core-3.5.21 lib/workarea/image_optim_processor.rb
workarea-core-3.4.42 lib/workarea/image_optim_processor.rb
workarea-core-3.5.20 lib/workarea/image_optim_processor.rb
workarea-core-3.4.41 lib/workarea/image_optim_processor.rb
workarea-core-3.5.19 lib/workarea/image_optim_processor.rb
workarea-core-3.4.40 lib/workarea/image_optim_processor.rb
workarea-core-3.5.18 lib/workarea/image_optim_processor.rb
workarea-core-3.4.39 lib/workarea/image_optim_processor.rb
workarea-core-3.5.17 lib/workarea/image_optim_processor.rb
workarea-core-3.4.38 lib/workarea/image_optim_processor.rb
workarea-core-3.5.16 lib/workarea/image_optim_processor.rb
workarea-core-3.4.37 lib/workarea/image_optim_processor.rb