Migrate from imagemagick to vips for image transformation
This commit is contained in:
parent
760dc7e99b
commit
24bcef23c6
4 changed files with 3 additions and 3 deletions
1
Gemfile
1
Gemfile
|
@ -52,7 +52,6 @@ gem 'param_validation', path: 'gems/ruby-param-validation'
|
|||
gem 'qx', path: 'gems/ruby-qx'
|
||||
|
||||
# Images
|
||||
gem 'mini_magick', '~> 4.10.1'
|
||||
gem 'image_processing', '~> 1.10.3'
|
||||
|
||||
# User authentication
|
||||
|
|
|
@ -486,7 +486,6 @@ DEPENDENCIES
|
|||
listen
|
||||
lograge (~> 0.11.2)
|
||||
mail_view (~> 2.0)
|
||||
mini_magick (~> 4.10.1)
|
||||
nearest_time_zone (~> 0.0.4)
|
||||
parallel (~> 1.17)
|
||||
parallel_tests (~> 2.32)
|
||||
|
|
|
@ -27,7 +27,7 @@ module Image::AttachmentExtensions
|
|||
#{sizes.map do |k,v|
|
||||
<<-INNER
|
||||
when :#{k.to_sym}
|
||||
return #{attribute}.variant(resize: "#{v[0]}x#{v[1]}")
|
||||
return #{attribute}.variant(resize_to_limit: [#{v[0]}, #{v[1]}])
|
||||
INNER
|
||||
end.join("\n")}
|
||||
else
|
||||
|
|
|
@ -108,5 +108,7 @@ module Commitchange
|
|||
|
||||
# we don't require belongs_to associations to be required for historical reasons.
|
||||
config.active_record.belongs_to_required_by_default = false
|
||||
|
||||
config.active_storage.variant_processor = :vips
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue