-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
app/uploaders/decidim/cw/alternative_landing/cover_image_uploader.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
20 changes: 20 additions & 0 deletions
20
app/uploaders/decidim/cw/alternative_landing/item_image_uploader.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |