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.4.13 lib/workarea/image_optim_processor.rb
workarea-core-3.4.12 lib/workarea/image_optim_processor.rb