make background gray for paperclip images

This commit is contained in:
Mojca Lorber 2017-11-23 14:35:42 +01:00
parent b9fe2fa426
commit 0ffe476a54

View file

@ -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: {