Change Paperclip File Type

I have an existing Paperclip installation that converts all uploaded images to JPG. However, I noticed that PNG and GIF, uploaded and converted to JPG, end up with strange colors and some kind of effect. I know that JPG does not support transparency, but I recently found the need to accept PNG and GIF and not convert them to JPG ...

My current configuration:

has_attached_file :icon,
                  :styles => { :featured => ["330x90>", :jpg], :thumb => ["48x48>", :jpg] },
                  :convert_options => { :all => "-quality 95" },
                  :path => "media/nation_apps/content_sources/:id/icon_:style.:extension"

When I deleted the key: jpg, it broke all existing downloads. How to change the clip setting so as not to force the JPG conversion, but still work with all my previously loaded attachments?

Any help would be greatly appreciated!

+3
source share
1 answer

,

rake paperclip:refresh CLASS=User

. , . . thumbnail generation.

+4

All Articles