Skip to content

Commit

Permalink
Add CW uploaders for migration
Browse files Browse the repository at this point in the history
  • Loading branch information
fblupi committed Apr 10, 2024
1 parent 7aeeedc commit a6771db
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true

module Decidim::Cw
module AlternativeLanding
# This class deals with uploading cover images to content blocks.
class CoverImageUploader < RecordImageUploader
version :big do
process resize_to_fit: [2880, 1620]
end

def max_image_height_or_width
8000
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# frozen_string_literal: true

module Decidim::Cw
module AlternativeLanding
# This class deals with uploading item images to content blocks.
class ItemImageUploader < RecordImageUploader
version :square do
process resize_to_fill: [960, 960]
end

version :landscape do
process resize_to_fill: [960, 540]
end

def max_image_height_or_width
4000
end
end
end
end

0 comments on commit a6771db

Please sign in to comment.