Merge pull request #868 from mlorb/ml-sci-1215

Fix preview for images with transparent background [SCI-1215]
This commit is contained in:
mlorb 2017-11-15 11:28:57 +01:00 committed by GitHub
commit 06fc0eac5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,8 +12,8 @@ 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: { medium: '-quality 70 -strip',
all: '-alpha remove' }
validates_attachment :file, validates_attachment :file,
presence: true, presence: true,
size: { size: {