mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-02 13:12:13 +08:00
make background gray for paperclip images
This commit is contained in:
parent
b9fe2fa426
commit
0ffe476a54
1 changed files with 4 additions and 2 deletions
|
@ -12,8 +12,10 @@ class Asset < ActiveRecord::Base
|
|||
has_attached_file :file,
|
||||
styles: { large: [Constants::LARGE_PIC_FORMAT, :jpg],
|
||||
medium: [Constants::MEDIUM_PIC_FORMAT, :jpg] },
|
||||
convert_options: { medium: '-quality 70 -strip',
|
||||
all: '-alpha remove' }
|
||||
convert_options: {
|
||||
medium: '-quality 70 -strip',
|
||||
all: '-background "#d2d2d2" -flatten +matte'
|
||||
}
|
||||
validates_attachment :file,
|
||||
presence: true,
|
||||
size: {
|
||||
|
|
Loading…
Reference in a new issue