Sha256: 31134800f44567c123c4f924b669ad414d4acdbc814b72be10019a30bf7678ca

Contents?: true

Size: 775 Bytes

Versions: 14

Compression:

Stored size: 775 Bytes

Contents

# frozen_string_literal: true
require "dragonfly_svg"
require "alchemy/dragonfly/processors/crop_resize"
require "alchemy/dragonfly/processors/auto_orient"

# Logger
Dragonfly.logger = Rails.logger

# Add model functionality
if defined?(ActiveRecord::Base)
  ActiveRecord::Base.extend Dragonfly::Model
  ActiveRecord::Base.extend Dragonfly::Model::Validations
end

# Dragonfly 1.4.0 only allows `quality` as argument to `encode`
Dragonfly::ImageMagick::Processors::Encode::WHITELISTED_ARGS << "flatten"

Rails.application.config.after_initialize do
  Dragonfly.app(:alchemy_pictures).add_processor(:crop_resize, Alchemy::Dragonfly::Processors::CropResize.new)
  Dragonfly.app(:alchemy_pictures).add_processor(:auto_orient, Alchemy::Dragonfly::Processors::AutoOrient.new)
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
alchemy_cms-6.0.0 config/initializers/dragonfly.rb
alchemy_cms-6.0.0.pre.rc7 config/initializers/dragonfly.rb
alchemy_cms-6.0.0.pre.rc6 config/initializers/dragonfly.rb
alchemy_cms-6.0.0.pre.rc5 config/initializers/dragonfly.rb
alchemy_cms-6.0.0.pre.rc4 config/initializers/dragonfly.rb
alchemy_cms-6.0.0.pre.rc3 config/initializers/dragonfly.rb
alchemy_cms-6.0.0.pre.rc2 config/initializers/dragonfly.rb
alchemy_cms-6.0.0.pre.rc1 config/initializers/dragonfly.rb
alchemy_cms-6.0.0.pre.b6 config/initializers/dragonfly.rb
alchemy_cms-6.0.0.pre.b5 config/initializers/dragonfly.rb
alchemy_cms-6.0.0.pre.b4 config/initializers/dragonfly.rb
alchemy_cms-6.0.0.b3 config/initializers/dragonfly.rb
alchemy_cms-6.0.0.b2 config/initializers/dragonfly.rb
alchemy_cms-6.0.0.b1 config/initializers/dragonfly.rb