fix preview for images with transparent background

This commit is contained in:
Mojca Lorber 2017-11-13 18:03:14 +01:00
parent cd6799d571
commit f75a2710d5

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