diff --git a/app/uploaders/decidim/cw/alternative_landing/cover_image_uploader.rb b/app/uploaders/decidim/cw/alternative_landing/cover_image_uploader.rb new file mode 100644 index 0000000..dd238e0 --- /dev/null +++ b/app/uploaders/decidim/cw/alternative_landing/cover_image_uploader.rb @@ -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 diff --git a/app/uploaders/decidim/cw/alternative_landing/item_image_uploader.rb b/app/uploaders/decidim/cw/alternative_landing/item_image_uploader.rb new file mode 100644 index 0000000..a12905a --- /dev/null +++ b/app/uploaders/decidim/cw/alternative_landing/item_image_uploader.rb @@ -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