mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-03 06:03:51 +08:00
Merge pull request #892 from mlorb/ml-sci-1215_v2
Make background gray for paperclip images [SCI-1215]
This commit is contained in:
commit
9e7b75a880
1 changed files with 4 additions and 2 deletions
|
@ -12,8 +12,10 @@ class Asset < ActiveRecord::Base
|
||||||
has_attached_file :file,
|
has_attached_file :file,
|
||||||
styles: { large: [Constants::LARGE_PIC_FORMAT, :jpg],
|
styles: { large: [Constants::LARGE_PIC_FORMAT, :jpg],
|
||||||
medium: [Constants::MEDIUM_PIC_FORMAT, :jpg] },
|
medium: [Constants::MEDIUM_PIC_FORMAT, :jpg] },
|
||||||
convert_options: { medium: '-quality 70 -strip',
|
convert_options: {
|
||||||
all: '-alpha remove' }
|
medium: '-quality 70 -strip',
|
||||||
|
all: '-background "#d2d2d2" -flatten +matte'
|
||||||
|
}
|
||||||
validates_attachment :file,
|
validates_attachment :file,
|
||||||
presence: true,
|
presence: true,
|
||||||
size: {
|
size: {
|
||||||
|
|
Loading…
Reference in a new issue